From 680b5ff819bf36397ea560f802510bce5b83f6bc Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 13 Sep 2022 21:22:35 -0400 Subject: treewide: add future annotations import --- mesonbuild/arglist.py | 1 + mesonbuild/ast/printer.py | 1 + mesonbuild/cmake/common.py | 1 + mesonbuild/cmake/fileapi.py | 1 + mesonbuild/cmake/generator.py | 1 + mesonbuild/cmake/traceparser.py | 1 + mesonbuild/cmake/tracetargets.py | 1 + mesonbuild/compilers/cython.py | 1 + mesonbuild/compilers/mixins/arm.py | 1 + mesonbuild/compilers/mixins/clang.py | 1 + mesonbuild/compilers/mixins/clike.py | 1 + mesonbuild/compilers/mixins/elbrus.py | 1 + mesonbuild/compilers/mixins/emscripten.py | 1 + mesonbuild/compilers/mixins/gnu.py | 1 + mesonbuild/compilers/mixins/intel.py | 1 + mesonbuild/compilers/mixins/islinker.py | 1 + mesonbuild/compilers/mixins/pgi.py | 1 + mesonbuild/compilers/mixins/visualstudio.py | 1 + mesonbuild/coredata.py | 1 + mesonbuild/dependencies/coarrays.py | 1 + mesonbuild/dependencies/configtool.py | 1 + mesonbuild/dependencies/cuda.py | 1 + mesonbuild/dependencies/detect.py | 1 + mesonbuild/dependencies/dub.py | 1 + mesonbuild/dependencies/framework.py | 1 + mesonbuild/dependencies/hdf5.py | 1 + mesonbuild/dependencies/misc.py | 1 + mesonbuild/dependencies/mpi.py | 1 + mesonbuild/dependencies/platform.py | 1 + mesonbuild/dependencies/qt.py | 1 + mesonbuild/dependencies/scalapack.py | 1 + mesonbuild/dependencies/ui.py | 2 ++ mesonbuild/depfile.py | 1 + mesonbuild/envconfig.py | 1 + mesonbuild/environment.py | 1 + mesonbuild/interpreter/compiler.py | 1 + mesonbuild/interpreter/kwargs.py | 1 + mesonbuild/interpreter/primitives/range.py | 1 + mesonbuild/interpreterbase/baseobjects.py | 1 + mesonbuild/interpreterbase/helpers.py | 1 + mesonbuild/linkers/linkers.py | 1 + mesonbuild/mcompile.py | 1 + mesonbuild/mconf.py | 1 + mesonbuild/mdevenv.py | 2 ++ mesonbuild/mdist.py | 1 + mesonbuild/mesondata.py | 1 + mesonbuild/mesonmain.py | 1 + mesonbuild/minit.py | 1 + mesonbuild/mlog.py | 2 +- mesonbuild/modules/dlang.py | 1 + mesonbuild/modules/external_project.py | 2 +- mesonbuild/modules/hotdoc.py | 1 + mesonbuild/modules/keyval.py | 1 + mesonbuild/modules/python3.py | 1 + mesonbuild/modules/rust.py | 2 +- mesonbuild/modules/simd.py | 1 + mesonbuild/modules/windows.py | 1 + mesonbuild/mparser.py | 2 +- mesonbuild/msetup.py | 1 + mesonbuild/mtest.py | 1 + mesonbuild/munstable_coredata.py | 1 + mesonbuild/optinterpreter.py | 3 ++- mesonbuild/programs.py | 1 + mesonbuild/scripts/clangformat.py | 1 + mesonbuild/scripts/clangtidy.py | 1 + mesonbuild/scripts/cleantrees.py | 1 + mesonbuild/scripts/cmake_run_ctgt.py | 1 + mesonbuild/scripts/copy.py | 1 + mesonbuild/scripts/coverage.py | 1 + mesonbuild/scripts/delwithsuffix.py | 1 + mesonbuild/scripts/depfixer.py | 1 + mesonbuild/scripts/dirchanger.py | 1 + mesonbuild/scripts/externalproject.py | 1 + mesonbuild/scripts/gettext.py | 1 + mesonbuild/scripts/gtkdochelper.py | 1 + mesonbuild/scripts/hotdochelper.py | 2 ++ mesonbuild/scripts/itstool.py | 1 + mesonbuild/scripts/meson_exe.py | 1 + mesonbuild/scripts/msgfmthelper.py | 1 + mesonbuild/scripts/regen_checker.py | 1 + mesonbuild/scripts/scanbuild.py | 1 + mesonbuild/scripts/symbolextractor.py | 1 + mesonbuild/scripts/tags.py | 1 + mesonbuild/scripts/uninstall.py | 1 + mesonbuild/scripts/vcstagger.py | 1 + mesonbuild/templates/cpptemplates.py | 2 ++ mesonbuild/templates/cstemplates.py | 2 ++ mesonbuild/templates/ctemplates.py | 2 ++ mesonbuild/templates/cudatemplates.py | 2 ++ mesonbuild/templates/dlangtemplates.py | 2 ++ mesonbuild/templates/fortrantemplates.py | 2 ++ mesonbuild/templates/javatemplates.py | 2 ++ mesonbuild/templates/mesontemplates.py | 1 + mesonbuild/templates/objcpptemplates.py | 2 ++ mesonbuild/templates/objctemplates.py | 2 ++ mesonbuild/templates/rusttemplates.py | 2 ++ mesonbuild/templates/samplefactory.py | 2 ++ mesonbuild/templates/sampleimpl.py | 1 + mesonbuild/templates/valatemplates.py | 2 ++ mesonbuild/utils/platform.py | 1 + mesonbuild/utils/posix.py | 1 + mesonbuild/utils/vsenv.py | 2 ++ mesonbuild/utils/win32.py | 1 + mesonbuild/wrap/wrap.py | 1 + mesonbuild/wrap/wraptool.py | 1 + 105 files changed, 122 insertions(+), 5 deletions(-) (limited to 'mesonbuild') diff --git a/mesonbuild/arglist.py b/mesonbuild/arglist.py index 189b77b..475d954 100644 --- a/mesonbuild/arglist.py +++ b/mesonbuild/arglist.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from functools import lru_cache import collections diff --git a/mesonbuild/ast/printer.py b/mesonbuild/ast/printer.py index 1e33cf0..3c53910 100644 --- a/mesonbuild/ast/printer.py +++ b/mesonbuild/ast/printer.py @@ -14,6 +14,7 @@ # This class contains the basic functionality needed to run any interpreter # or an interpreter-based tool +from __future__ import annotations from .. import mparser from . import AstVisitor diff --git a/mesonbuild/cmake/common.py b/mesonbuild/cmake/common.py index dffdbdf..accb7c9 100644 --- a/mesonbuild/cmake/common.py +++ b/mesonbuild/cmake/common.py @@ -14,6 +14,7 @@ # This class contains the basic functionality needed to run any interpreter # or an interpreter-based tool. +from __future__ import annotations from ..mesonlib import MesonException, OptionKey from .. import mlog diff --git a/mesonbuild/cmake/fileapi.py b/mesonbuild/cmake/fileapi.py index fce2891..9605f92 100644 --- a/mesonbuild/cmake/fileapi.py +++ b/mesonbuild/cmake/fileapi.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .common import CMakeException, CMakeBuildFile, CMakeConfiguration import typing as T diff --git a/mesonbuild/cmake/generator.py b/mesonbuild/cmake/generator.py index 9c9fa1c..7903dd4 100644 --- a/mesonbuild/cmake/generator.py +++ b/mesonbuild/cmake/generator.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .. import mesonlib from .. import mlog diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index 54e6bef..5fcba80 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -14,6 +14,7 @@ # This class contains the basic functionality needed to run any interpreter # or an interpreter-based tool. +from __future__ import annotations from .common import CMakeException from .generator import parse_generator_expressions diff --git a/mesonbuild/cmake/tracetargets.py b/mesonbuild/cmake/tracetargets.py index d64d1a1..338364d 100644 --- a/mesonbuild/cmake/tracetargets.py +++ b/mesonbuild/cmake/tracetargets.py @@ -1,5 +1,6 @@ # SPDX-License-Identifer: Apache-2.0 # Copyright 2021 The Meson development team +from __future__ import annotations from .common import cmake_is_debug from .. import mlog diff --git a/mesonbuild/compilers/cython.py b/mesonbuild/compilers/cython.py index ac5c934..763279e 100644 --- a/mesonbuild/compilers/cython.py +++ b/mesonbuild/compilers/cython.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright © 2021 Intel Corporation +from __future__ import annotations """Abstraction for Cython language compilers.""" diff --git a/mesonbuild/compilers/mixins/arm.py b/mesonbuild/compilers/mixins/arm.py index f0cbf59..5d0fb87 100644 --- a/mesonbuild/compilers/mixins/arm.py +++ b/mesonbuild/compilers/mixins/arm.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Representations specific to the arm family of compilers.""" diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py index 35de264..cdb4c23 100644 --- a/mesonbuild/compilers/mixins/clang.py +++ b/mesonbuild/compilers/mixins/clang.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Abstractions for the LLVM/Clang compiler family.""" diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 4449aa7..ed485d2 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Mixin classes to be shared between C and C++ compilers. diff --git a/mesonbuild/compilers/mixins/elbrus.py b/mesonbuild/compilers/mixins/elbrus.py index 7362039..872649b 100644 --- a/mesonbuild/compilers/mixins/elbrus.py +++ b/mesonbuild/compilers/mixins/elbrus.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Abstractions for the Elbrus family of compilers.""" diff --git a/mesonbuild/compilers/mixins/emscripten.py b/mesonbuild/compilers/mixins/emscripten.py index a2de4e9..77b1c33 100644 --- a/mesonbuild/compilers/mixins/emscripten.py +++ b/mesonbuild/compilers/mixins/emscripten.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Provides a mixin for shared code between C and C++ Emscripten compilers.""" diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index 8152b25..2f7de25 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Provides mixins for GNU compilers and GNU-like compilers.""" diff --git a/mesonbuild/compilers/mixins/intel.py b/mesonbuild/compilers/mixins/intel.py index 9877a54..b793fa8 100644 --- a/mesonbuild/compilers/mixins/intel.py +++ b/mesonbuild/compilers/mixins/intel.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Abstractions for the Intel Compiler families. diff --git a/mesonbuild/compilers/mixins/islinker.py b/mesonbuild/compilers/mixins/islinker.py index 9da7ae8..711e3e3 100644 --- a/mesonbuild/compilers/mixins/islinker.py +++ b/mesonbuild/compilers/mixins/islinker.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Mixins for compilers that *are* linkers. diff --git a/mesonbuild/compilers/mixins/pgi.py b/mesonbuild/compilers/mixins/pgi.py index 212d130..2fa736c 100644 --- a/mesonbuild/compilers/mixins/pgi.py +++ b/mesonbuild/compilers/mixins/pgi.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Abstractions for the PGI family of compilers.""" diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py index 0473f2e..5a326dc 100644 --- a/mesonbuild/compilers/mixins/visualstudio.py +++ b/mesonbuild/compilers/mixins/visualstudio.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Abstractions to simplify compilers that implement an MSVC compatible interface. diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index de5a8c9..c90d48b 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -10,6 +10,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import copy diff --git a/mesonbuild/dependencies/coarrays.py b/mesonbuild/dependencies/coarrays.py index b50fb0a..70cf4f8 100644 --- a/mesonbuild/dependencies/coarrays.py +++ b/mesonbuild/dependencies/coarrays.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import functools import typing as T diff --git a/mesonbuild/dependencies/configtool.py b/mesonbuild/dependencies/configtool.py index 1c8d730..1f16a43 100644 --- a/mesonbuild/dependencies/configtool.py +++ b/mesonbuild/dependencies/configtool.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .base import ExternalDependency, DependencyException, DependencyTypeName from ..mesonlib import listify, Popen_safe, split_args, version_compare, version_compare_many diff --git a/mesonbuild/dependencies/cuda.py b/mesonbuild/dependencies/cuda.py index 608d4f7..8772427 100644 --- a/mesonbuild/dependencies/cuda.py +++ b/mesonbuild/dependencies/cuda.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import glob import re diff --git a/mesonbuild/dependencies/detect.py b/mesonbuild/dependencies/detect.py index 782c2f1..4c7a477 100644 --- a/mesonbuild/dependencies/detect.py +++ b/mesonbuild/dependencies/detect.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .base import ExternalDependency, DependencyException, DependencyMethods, NotFoundDependency from .cmake import CMakeDependency diff --git a/mesonbuild/dependencies/dub.py b/mesonbuild/dependencies/dub.py index a4a7676..ac2b667 100644 --- a/mesonbuild/dependencies/dub.py +++ b/mesonbuild/dependencies/dub.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .base import ExternalDependency, DependencyException, DependencyTypeName from .pkgconfig import PkgConfigDependency diff --git a/mesonbuild/dependencies/framework.py b/mesonbuild/dependencies/framework.py index f288851..b02b3ce 100644 --- a/mesonbuild/dependencies/framework.py +++ b/mesonbuild/dependencies/framework.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .base import DependencyTypeName, ExternalDependency, DependencyException from ..mesonlib import MesonException, Version, stringlistify diff --git a/mesonbuild/dependencies/hdf5.py b/mesonbuild/dependencies/hdf5.py index 27f127d..4e5820a 100644 --- a/mesonbuild/dependencies/hdf5.py +++ b/mesonbuild/dependencies/hdf5.py @@ -13,6 +13,7 @@ # limitations under the License. # This file contains the detection logic for miscellaneous external dependencies. +from __future__ import annotations import functools import os diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 07f4e9a..2913d84 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -13,6 +13,7 @@ # limitations under the License. # This file contains the detection logic for miscellaneous external dependencies. +from __future__ import annotations from pathlib import Path import functools diff --git a/mesonbuild/dependencies/mpi.py b/mesonbuild/dependencies/mpi.py index ddb512a..8f83ce4 100644 --- a/mesonbuild/dependencies/mpi.py +++ b/mesonbuild/dependencies/mpi.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import functools import typing as T diff --git a/mesonbuild/dependencies/platform.py b/mesonbuild/dependencies/platform.py index 1fd1d78..6d32555 100644 --- a/mesonbuild/dependencies/platform.py +++ b/mesonbuild/dependencies/platform.py @@ -14,6 +14,7 @@ # This file contains the detection logic for external dependencies that are # platform-specific (generally speaking). +from __future__ import annotations from .base import DependencyTypeName, ExternalDependency, DependencyException from ..mesonlib import MesonException diff --git a/mesonbuild/dependencies/qt.py b/mesonbuild/dependencies/qt.py index c6162ed..6dd712d 100644 --- a/mesonbuild/dependencies/qt.py +++ b/mesonbuild/dependencies/qt.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Dependency finders for the Qt framework.""" diff --git a/mesonbuild/dependencies/scalapack.py b/mesonbuild/dependencies/scalapack.py index 656978d..be8ee70 100644 --- a/mesonbuild/dependencies/scalapack.py +++ b/mesonbuild/dependencies/scalapack.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from pathlib import Path import functools diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index 66b13ec..2c341af 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -14,6 +14,8 @@ # This file contains the detection logic for external dependencies that # are UI-related. +from __future__ import annotations + import os import subprocess import typing as T diff --git a/mesonbuild/depfile.py b/mesonbuild/depfile.py index 912a817..d346136 100644 --- a/mesonbuild/depfile.py +++ b/mesonbuild/depfile.py @@ -10,6 +10,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import typing as T diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 2069664..90117c1 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from dataclasses import dataclass import subprocess diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 37c32bc..40629da 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import itertools import os, platform, re, sys, shutil diff --git a/mesonbuild/interpreter/compiler.py b/mesonbuild/interpreter/compiler.py index 8b6efd2..95126cf 100644 --- a/mesonbuild/interpreter/compiler.py +++ b/mesonbuild/interpreter/compiler.py @@ -1,6 +1,7 @@ # SPDX-Licnese-Identifier: Apache-2.0 # Copyright 2012-2021 The Meson development team # Copyright © 2021 Intel Corporation +from __future__ import annotations import enum import functools diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py index 1589c65..fb02374 100644 --- a/mesonbuild/interpreter/kwargs.py +++ b/mesonbuild/interpreter/kwargs.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright © 2021 The Meson Developers # Copyright © 2021 Intel Corporation +from __future__ import annotations """Keyword Argument type annotations.""" diff --git a/mesonbuild/interpreter/primitives/range.py b/mesonbuild/interpreter/primitives/range.py index dd99205..5eb5e03 100644 --- a/mesonbuild/interpreter/primitives/range.py +++ b/mesonbuild/interpreter/primitives/range.py @@ -1,5 +1,6 @@ # Copyright 2021 The Meson development team # SPDX-license-identifier: Apache-2.0 +from __future__ import annotations import typing as T diff --git a/mesonbuild/interpreterbase/baseobjects.py b/mesonbuild/interpreterbase/baseobjects.py index a65b053..820e091 100644 --- a/mesonbuild/interpreterbase/baseobjects.py +++ b/mesonbuild/interpreterbase/baseobjects.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .. import mparser from .exceptions import InvalidCode, InvalidArguments diff --git a/mesonbuild/interpreterbase/helpers.py b/mesonbuild/interpreterbase/helpers.py index 12fa813..2196b4e 100644 --- a/mesonbuild/interpreterbase/helpers.py +++ b/mesonbuild/interpreterbase/helpers.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .. import mesonlib, mparser from .exceptions import InterpreterException diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index 890e526..5799caf 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import abc import enum diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py index 27ef46c..2f5cee9 100644 --- a/mesonbuild/mcompile.py +++ b/mesonbuild/mcompile.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Entrypoint script for backend agnostic compile.""" diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 54eacef..33db57b 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import itertools import shutil diff --git a/mesonbuild/mdevenv.py b/mesonbuild/mdevenv.py index eaed141..7561ed9 100644 --- a/mesonbuild/mdevenv.py +++ b/mesonbuild/mdevenv.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os, subprocess import argparse import tempfile diff --git a/mesonbuild/mdist.py b/mesonbuild/mdist.py index 0aa4d07..073e276 100644 --- a/mesonbuild/mdist.py +++ b/mesonbuild/mdist.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import argparse diff --git a/mesonbuild/mesondata.py b/mesonbuild/mesondata.py index 508c041..da641fd 100644 --- a/mesonbuild/mesondata.py +++ b/mesonbuild/mesondata.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import importlib.resources diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index c720242..061cde9 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations # Work around some pathlib bugs... diff --git a/mesonbuild/minit.py b/mesonbuild/minit.py index 70adb26..53e0aa9 100644 --- a/mesonbuild/minit.py +++ b/mesonbuild/minit.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Code that creates simple startup projects.""" diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py index 7080960..b778bfa 100644 --- a/mesonbuild/mlog.py +++ b/mesonbuild/mlog.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - from __future__ import annotations + import enum import os import io diff --git a/mesonbuild/modules/dlang.py b/mesonbuild/modules/dlang.py index 7a9b99f..b9d4299 100644 --- a/mesonbuild/modules/dlang.py +++ b/mesonbuild/modules/dlang.py @@ -14,6 +14,7 @@ # This file contains the detection logic for external dependencies that # are UI-related. +from __future__ import annotations import json import os diff --git a/mesonbuild/modules/external_project.py b/mesonbuild/modules/external_project.py index 087850b..8b0ae93 100644 --- a/mesonbuild/modules/external_project.py +++ b/mesonbuild/modules/external_project.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - from __future__ import annotations + from pathlib import Path import os import shlex diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py index 3dac9be..b73d812 100644 --- a/mesonbuild/modules/hotdoc.py +++ b/mesonbuild/modules/hotdoc.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations '''This module provides helper functions for generating documentation using hotdoc''' diff --git a/mesonbuild/modules/keyval.py b/mesonbuild/modules/keyval.py index e900a2b..1ba2f1c 100644 --- a/mesonbuild/modules/keyval.py +++ b/mesonbuild/modules/keyval.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import typing as T diff --git a/mesonbuild/modules/python3.py b/mesonbuild/modules/python3.py index 52f8531..065e8d7 100644 --- a/mesonbuild/modules/python3.py +++ b/mesonbuild/modules/python3.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import sysconfig from .. import mesonlib diff --git a/mesonbuild/modules/rust.py b/mesonbuild/modules/rust.py index 02003ec..126b894 100644 --- a/mesonbuild/modules/rust.py +++ b/mesonbuild/modules/rust.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - from __future__ import annotations + import os import typing as T diff --git a/mesonbuild/modules/simd.py b/mesonbuild/modules/simd.py index a33022d..3ee0858 100644 --- a/mesonbuild/modules/simd.py +++ b/mesonbuild/modules/simd.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .. import mesonlib, compilers, mlog from .. import build diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index dec6e2e..494cfbf 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import enum import os diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py index b9caf9c..b0e817c 100644 --- a/mesonbuild/mparser.py +++ b/mesonbuild/mparser.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - from __future__ import annotations + from dataclasses import dataclass import re import codecs diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 4b6d508..41cc441 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import typing as T import time diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index a7214f9..a46125d 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -13,6 +13,7 @@ # limitations under the License. # A tool to run tests in many different ways. +from __future__ import annotations from pathlib import Path from collections import deque diff --git a/mesonbuild/munstable_coredata.py b/mesonbuild/munstable_coredata.py index fa3b720..37c8490 100644 --- a/mesonbuild/munstable_coredata.py +++ b/mesonbuild/munstable_coredata.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from . import coredata as cdata diff --git a/mesonbuild/optinterpreter.py b/mesonbuild/optinterpreter.py index 3c52852..d165639 100644 --- a/mesonbuild/optinterpreter.py +++ b/mesonbuild/optinterpreter.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - from __future__ import annotations + import re import typing as T @@ -22,6 +22,7 @@ from . import mparser from . import mlog from .interpreterbase import FeatureNew, typed_pos_args, typed_kwargs, ContainerTypeInfo, KwargInfo, FeatureDeprecated from .interpreter.type_checking import NoneType, in_set_validator + if T.TYPE_CHECKING: from .interpreterbase import TYPE_var, TYPE_kwargs from .interpreterbase import SubProject diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index 1d616aa..64f7c29 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Representations and logic for External and Internal Programs.""" diff --git a/mesonbuild/scripts/clangformat.py b/mesonbuild/scripts/clangformat.py index f2f6a77..a706b76 100644 --- a/mesonbuild/scripts/clangformat.py +++ b/mesonbuild/scripts/clangformat.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import argparse import subprocess diff --git a/mesonbuild/scripts/clangtidy.py b/mesonbuild/scripts/clangtidy.py index 7364e27..324a26e 100644 --- a/mesonbuild/scripts/clangtidy.py +++ b/mesonbuild/scripts/clangtidy.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import argparse import subprocess diff --git a/mesonbuild/scripts/cleantrees.py b/mesonbuild/scripts/cleantrees.py index 1a38753..3512f56 100644 --- a/mesonbuild/scripts/cleantrees.py +++ b/mesonbuild/scripts/cleantrees.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import sys diff --git a/mesonbuild/scripts/cmake_run_ctgt.py b/mesonbuild/scripts/cmake_run_ctgt.py index 33e07d6..a788ba5 100755 --- a/mesonbuild/scripts/cmake_run_ctgt.py +++ b/mesonbuild/scripts/cmake_run_ctgt.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +from __future__ import annotations import argparse import subprocess diff --git a/mesonbuild/scripts/copy.py b/mesonbuild/scripts/copy.py index acef2a8..dba13a5 100644 --- a/mesonbuild/scripts/copy.py +++ b/mesonbuild/scripts/copy.py @@ -1,5 +1,6 @@ # SPDX-License-Identifer: Apache-2.0 # Copyright © 2021 Intel Corporation +from __future__ import annotations """Helper script to copy files at build time. diff --git a/mesonbuild/scripts/coverage.py b/mesonbuild/scripts/coverage.py index 6281486..5e78639 100644 --- a/mesonbuild/scripts/coverage.py +++ b/mesonbuild/scripts/coverage.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from mesonbuild import environment, mesonlib diff --git a/mesonbuild/scripts/delwithsuffix.py b/mesonbuild/scripts/delwithsuffix.py index 873db0d..f58b19c 100644 --- a/mesonbuild/scripts/delwithsuffix.py +++ b/mesonbuild/scripts/delwithsuffix.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os, sys import typing as T diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py index 8d9c90f..ae18594 100644 --- a/mesonbuild/scripts/depfixer.py +++ b/mesonbuild/scripts/depfixer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import sys diff --git a/mesonbuild/scripts/dirchanger.py b/mesonbuild/scripts/dirchanger.py index 21632cd..60c4f12 100644 --- a/mesonbuild/scripts/dirchanger.py +++ b/mesonbuild/scripts/dirchanger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations '''CD into dir given as first argument and execute the command given in the rest of the arguments.''' diff --git a/mesonbuild/scripts/externalproject.py b/mesonbuild/scripts/externalproject.py index f15f26a..17c2251 100644 --- a/mesonbuild/scripts/externalproject.py +++ b/mesonbuild/scripts/externalproject.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import argparse diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py index c31657a..4a6bb9c 100644 --- a/mesonbuild/scripts/gettext.py +++ b/mesonbuild/scripts/gettext.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import argparse diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py index 260d658..ded952d 100644 --- a/mesonbuild/scripts/gtkdochelper.py +++ b/mesonbuild/scripts/gtkdochelper.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import sys, os import subprocess diff --git a/mesonbuild/scripts/hotdochelper.py b/mesonbuild/scripts/hotdochelper.py index a96a34a..2c3b85d 100644 --- a/mesonbuild/scripts/hotdochelper.py +++ b/mesonbuild/scripts/hotdochelper.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import shutil import subprocess diff --git a/mesonbuild/scripts/itstool.py b/mesonbuild/scripts/itstool.py index b23ad8a..0bfcaf9 100644 --- a/mesonbuild/scripts/itstool.py +++ b/mesonbuild/scripts/itstool.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import argparse diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py index 3dd91c9..33408d8 100644 --- a/mesonbuild/scripts/meson_exe.py +++ b/mesonbuild/scripts/meson_exe.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import sys diff --git a/mesonbuild/scripts/msgfmthelper.py b/mesonbuild/scripts/msgfmthelper.py index b308f54..28bcc8b 100644 --- a/mesonbuild/scripts/msgfmthelper.py +++ b/mesonbuild/scripts/msgfmthelper.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import argparse import subprocess diff --git a/mesonbuild/scripts/regen_checker.py b/mesonbuild/scripts/regen_checker.py index c96bdc1..f3a6f3c 100644 --- a/mesonbuild/scripts/regen_checker.py +++ b/mesonbuild/scripts/regen_checker.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import sys, os import pickle, subprocess diff --git a/mesonbuild/scripts/scanbuild.py b/mesonbuild/scripts/scanbuild.py index bb8e30c..9cfc75d 100644 --- a/mesonbuild/scripts/scanbuild.py +++ b/mesonbuild/scripts/scanbuild.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import subprocess import shutil diff --git a/mesonbuild/scripts/symbolextractor.py b/mesonbuild/scripts/symbolextractor.py index 393e66f..08d839b 100644 --- a/mesonbuild/scripts/symbolextractor.py +++ b/mesonbuild/scripts/symbolextractor.py @@ -19,6 +19,7 @@ # This file is basically a reimplementation of # http://cgit.freedesktop.org/libreoffice/core/commit/?id=3213cd54b76bc80a6f0516aac75a48ff3b2ad67c +from __future__ import annotations import typing as T import os, sys diff --git a/mesonbuild/scripts/tags.py b/mesonbuild/scripts/tags.py index 8f1706d..c856807 100644 --- a/mesonbuild/scripts/tags.py +++ b/mesonbuild/scripts/tags.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import subprocess diff --git a/mesonbuild/scripts/uninstall.py b/mesonbuild/scripts/uninstall.py index f08490f..8548766 100644 --- a/mesonbuild/scripts/uninstall.py +++ b/mesonbuild/scripts/uninstall.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import os import typing as T diff --git a/mesonbuild/scripts/vcstagger.py b/mesonbuild/scripts/vcstagger.py index 18cf5f7..051a970 100644 --- a/mesonbuild/scripts/vcstagger.py +++ b/mesonbuild/scripts/vcstagger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import sys, os, subprocess, re import typing as T diff --git a/mesonbuild/templates/cpptemplates.py b/mesonbuild/templates/cpptemplates.py index 61c2737..6e97761 100644 --- a/mesonbuild/templates/cpptemplates.py +++ b/mesonbuild/templates/cpptemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/cstemplates.py b/mesonbuild/templates/cstemplates.py index bad7984..df09f61 100644 --- a/mesonbuild/templates/cstemplates.py +++ b/mesonbuild/templates/cstemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/ctemplates.py b/mesonbuild/templates/ctemplates.py index 9b651bc..0c7141a 100644 --- a/mesonbuild/templates/ctemplates.py +++ b/mesonbuild/templates/ctemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/cudatemplates.py b/mesonbuild/templates/cudatemplates.py index bbb1a3e..63abd2b 100644 --- a/mesonbuild/templates/cudatemplates.py +++ b/mesonbuild/templates/cudatemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/dlangtemplates.py b/mesonbuild/templates/dlangtemplates.py index 3d939d8..81840fe 100644 --- a/mesonbuild/templates/dlangtemplates.py +++ b/mesonbuild/templates/dlangtemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/fortrantemplates.py b/mesonbuild/templates/fortrantemplates.py index 8fc1bca..00cd509 100644 --- a/mesonbuild/templates/fortrantemplates.py +++ b/mesonbuild/templates/fortrantemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/javatemplates.py b/mesonbuild/templates/javatemplates.py index e432961..58d48ba 100644 --- a/mesonbuild/templates/javatemplates.py +++ b/mesonbuild/templates/javatemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/mesontemplates.py b/mesonbuild/templates/mesontemplates.py index 69939be..2868f7b 100644 --- a/mesonbuild/templates/mesontemplates.py +++ b/mesonbuild/templates/mesontemplates.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import argparse diff --git a/mesonbuild/templates/objcpptemplates.py b/mesonbuild/templates/objcpptemplates.py index 11a5091..450f2b0 100644 --- a/mesonbuild/templates/objcpptemplates.py +++ b/mesonbuild/templates/objcpptemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/objctemplates.py b/mesonbuild/templates/objctemplates.py index dac638d..2e03526 100644 --- a/mesonbuild/templates/objctemplates.py +++ b/mesonbuild/templates/objctemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/rusttemplates.py b/mesonbuild/templates/rusttemplates.py index 95a937c..0dde547 100644 --- a/mesonbuild/templates/rusttemplates.py +++ b/mesonbuild/templates/rusttemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/templates/samplefactory.py b/mesonbuild/templates/samplefactory.py index 3678a02..1950837 100644 --- a/mesonbuild/templates/samplefactory.py +++ b/mesonbuild/templates/samplefactory.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.valatemplates import ValaProject from mesonbuild.templates.fortrantemplates import FortranProject from mesonbuild.templates.objcpptemplates import ObjCppProject diff --git a/mesonbuild/templates/sampleimpl.py b/mesonbuild/templates/sampleimpl.py index 2d1498b..9702ae8 100644 --- a/mesonbuild/templates/sampleimpl.py +++ b/mesonbuild/templates/sampleimpl.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations class SampleImpl: diff --git a/mesonbuild/templates/valatemplates.py b/mesonbuild/templates/valatemplates.py index 1aeb46a..ef9794d 100644 --- a/mesonbuild/templates/valatemplates.py +++ b/mesonbuild/templates/valatemplates.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from mesonbuild.templates.sampleimpl import SampleImpl import re diff --git a/mesonbuild/utils/platform.py b/mesonbuild/utils/platform.py index f0676a6..4a3927d 100644 --- a/mesonbuild/utils/platform.py +++ b/mesonbuild/utils/platform.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """base classes providing no-op functionality..""" diff --git a/mesonbuild/utils/posix.py b/mesonbuild/utils/posix.py index 67f9a44..161e8fc 100644 --- a/mesonbuild/utils/posix.py +++ b/mesonbuild/utils/posix.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Posix specific implementations of mesonlib functionality.""" diff --git a/mesonbuild/utils/vsenv.py b/mesonbuild/utils/vsenv.py index 47055a0..d862e5a 100644 --- a/mesonbuild/utils/vsenv.py +++ b/mesonbuild/utils/vsenv.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import subprocess import json diff --git a/mesonbuild/utils/win32.py b/mesonbuild/utils/win32.py index bc0caec..2bd4cba 100644 --- a/mesonbuild/utils/win32.py +++ b/mesonbuild/utils/win32.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """Windows specific implementations of mesonlib functionality.""" diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index 076c7c8..313b749 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from .. import mlog import contextlib diff --git a/mesonbuild/wrap/wraptool.py b/mesonbuild/wrap/wraptool.py index bcf0e67..c009aa1 100644 --- a/mesonbuild/wrap/wraptool.py +++ b/mesonbuild/wrap/wraptool.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import sys, os import configparser -- cgit v1.1