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 /sources/pyside-tools/qtpy2cpp_lib | |
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 'sources/pyside-tools/qtpy2cpp_lib')
8 files changed, 8 insertions, 0 deletions
diff --git a/sources/pyside-tools/qtpy2cpp_lib/astdump.py b/sources/pyside-tools/qtpy2cpp_lib/astdump.py index d92fb7589..469b0368a 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/astdump.py +++ b/sources/pyside-tools/qtpy2cpp_lib/astdump.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 """Tool to dump a Python AST""" diff --git a/sources/pyside-tools/qtpy2cpp_lib/formatter.py b/sources/pyside-tools/qtpy2cpp_lib/formatter.py index 9a38e803d..ad4903717 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/formatter.py +++ b/sources/pyside-tools/qtpy2cpp_lib/formatter.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 """C++ formatting helper functions and formatter class""" diff --git a/sources/pyside-tools/qtpy2cpp_lib/nodedump.py b/sources/pyside-tools/qtpy2cpp_lib/nodedump.py index de62e9700..c101f1fdf 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/nodedump.py +++ b/sources/pyside-tools/qtpy2cpp_lib/nodedump.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 """Helper to dump AST nodes for debugging""" diff --git a/sources/pyside-tools/qtpy2cpp_lib/qt.py b/sources/pyside-tools/qtpy2cpp_lib/qt.py index 69bd54aeb..4827a09ac 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/qt.py +++ b/sources/pyside-tools/qtpy2cpp_lib/qt.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 """Provides some type information on Qt classes""" diff --git a/sources/pyside-tools/qtpy2cpp_lib/tests/baseline/basic_test.py b/sources/pyside-tools/qtpy2cpp_lib/tests/baseline/basic_test.py index 1466ac6b1..62805cd15 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/tests/baseline/basic_test.py +++ b/sources/pyside-tools/qtpy2cpp_lib/tests/baseline/basic_test.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +from __future__ import annotations import sys diff --git a/sources/pyside-tools/qtpy2cpp_lib/tests/test_qtpy2cpp.py b/sources/pyside-tools/qtpy2cpp_lib/tests/test_qtpy2cpp.py index 894b2a958..73dbd2e58 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/tests/test_qtpy2cpp.py +++ b/sources/pyside-tools/qtpy2cpp_lib/tests/test_qtpy2cpp.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 subprocess import tempfile diff --git a/sources/pyside-tools/qtpy2cpp_lib/tokenizer.py b/sources/pyside-tools/qtpy2cpp_lib/tokenizer.py index d5e26c2a8..4f81ba5a2 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/tokenizer.py +++ b/sources/pyside-tools/qtpy2cpp_lib/tokenizer.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 """Tool to dump Python Tokens""" diff --git a/sources/pyside-tools/qtpy2cpp_lib/visitor.py b/sources/pyside-tools/qtpy2cpp_lib/visitor.py index 2056951ae..e3f39e997 100644 --- a/sources/pyside-tools/qtpy2cpp_lib/visitor.py +++ b/sources/pyside-tools/qtpy2cpp_lib/visitor.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 """AST visitor printing out C++""" |