diff options
| author | Christian Tismer <tismer@stackless.com> | 2024-06-20 13:38:14 +0200 |
|---|---|---|
| committer | Christian Tismer <tismer@stackless.com> | 2024-06-20 13:57:34 +0200 |
| commit | 50061290756323ff339bd0473e67117c8191d130 (patch) | |
| tree | fb8caaaddcafc0abe0958d24f9e79ca9a480c057 /tools/snippets_translate | |
| parent | 2b77370de90e9a342b3d00f6bb5c44e70579b458 (diff) | |
Python-3.10: Allow the new syntax for Python 3.9
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Diffstat (limited to 'tools/snippets_translate')
| -rw-r--r-- | tools/snippets_translate/converter.py | 1 | ||||
| -rw-r--r-- | tools/snippets_translate/handlers.py | 1 | ||||
| -rw-r--r-- | tools/snippets_translate/main.py | 1 | ||||
| -rw-r--r-- | tools/snippets_translate/module_classes.py | 1 | ||||
| -rw-r--r-- | tools/snippets_translate/override.py | 1 | ||||
| -rw-r--r-- | tools/snippets_translate/parse_utils.py | 1 | ||||
| -rw-r--r-- | tools/snippets_translate/tests/test_converter.py | 1 | ||||
| -rw-r--r-- | tools/snippets_translate/tests/test_snippets.py | 1 |
8 files changed, 8 insertions, 0 deletions
diff --git a/tools/snippets_translate/converter.py b/tools/snippets_translate/converter.py index d45bf277f..7179a94a0 100644 --- a/tools/snippets_translate/converter.py +++ b/tools/snippets_translate/converter.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations import re diff --git a/tools/snippets_translate/handlers.py b/tools/snippets_translate/handlers.py index 34e969a62..7941dc9ed 100644 --- a/tools/snippets_translate/handlers.py +++ b/tools/snippets_translate/handlers.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations import re import sys diff --git a/tools/snippets_translate/main.py b/tools/snippets_translate/main.py index 01ea06c5e..488a1b1b2 100644 --- a/tools/snippets_translate/main.py +++ b/tools/snippets_translate/main.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations import logging import os diff --git a/tools/snippets_translate/module_classes.py b/tools/snippets_translate/module_classes.py index df4c7557c..c5f491e47 100644 --- a/tools/snippets_translate/module_classes.py +++ b/tools/snippets_translate/module_classes.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations module_classes = { diff --git a/tools/snippets_translate/override.py b/tools/snippets_translate/override.py index e7623d8a5..c8f3d85d8 100644 --- a/tools/snippets_translate/override.py +++ b/tools/snippets_translate/override.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations from pathlib import Path diff --git a/tools/snippets_translate/parse_utils.py b/tools/snippets_translate/parse_utils.py index 234d1b669..688938628 100644 --- a/tools/snippets_translate/parse_utils.py +++ b/tools/snippets_translate/parse_utils.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations import re diff --git a/tools/snippets_translate/tests/test_converter.py b/tools/snippets_translate/tests/test_converter.py index 084cc8a6d..efbedc7e9 100644 --- a/tools/snippets_translate/tests/test_converter.py +++ b/tools/snippets_translate/tests/test_converter.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations from converter import snippet_translate as st diff --git a/tools/snippets_translate/tests/test_snippets.py b/tools/snippets_translate/tests/test_snippets.py index 84897d815..e914077e7 100644 --- a/tools/snippets_translate/tests/test_snippets.py +++ b/tools/snippets_translate/tests/test_snippets.py @@ -1,5 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +from __future__ import annotations from main import _get_snippets, get_snippet_ids, CPP_SNIPPET_PATTERN |
