diff --git a/mesonbuild/arglist.py b/mesonbuild/arglist.py index 189b77b93..475d95478 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 1e33cf021..3c5391018 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 dffdbdf74..accb7c937 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 fce289161..9605f920d 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 9c9fa1c49..7903dd49f 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 54e6bef97..5fcba806a 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 d64d1a1de..338364dbd 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 ac5c9340e..763279eb7 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 f0cbf592c..5d0fb8754 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 35de264c2..cdb4c2300 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 4449aa7d1..ed485d261 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 736203988..872649bb5 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 a2de4e9ac..77b1c3386 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 8152b2538..2f7de254f 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 9877a54ff..b793fa83b 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 9da7ae8bc..711e3e376 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 212d130d7..2fa736c58 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 0473f2ee4..5a326dc4a 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 de5a8c991..c90d48bb8 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 b50fb0aa5..70cf4f89e 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 1c8d730bd..1f16a4316 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 608d4f784..877242753 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 782c2f175..4c7a47734 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 a4a767639..ac2b6675d 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 f28885148..b02b3ceb7 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 27f127d4f..4e5820ae5 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 07f4e9a7f..2913d844b 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 ddb512aeb..8f83ce493 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 1fd1d7880..6d32555e3 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 c6162ed14..6dd712d00 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 656978df2..be8ee7031 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 66b13eced..2c341afc2 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 912a81732..d346136ed 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 20696648a..90117c180 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 37c32bcbe..40629dac1 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 8b6efd2b4..95126cf38 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 1589c659e..fb02374f6 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 dd992054d..5eb5e033e 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 a65b0536d..820e0918c 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 12fa8139b..2196b4e73 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 890e52697..5799caf76 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 27ef46ce0..2f5cee904 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 54eacefaa..33db57b15 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 eaed141c2..7561ed9ab 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 0aa4d07df..073e276c4 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 508c041c2..da641fda7 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 c7202426f..061cde9b0 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 70adb2699..53e0aa9c5 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 7080960df..b778bfa68 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 7a9b99fd5..b9d4299cf 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 087850bbb..8b0ae93a4 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 3dac9be85..b73d81279 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 e900a2b02..1ba2f1c9a 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 52f8531f1..065e8d7a2 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 02003ec96..126b8942c 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 a33022d04..3ee0858b3 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 dec6e2e26..494cfbffd 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 b9caf9c35..b0e817c8b 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 4b6d50882..41cc441b6 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 a7214f9d7..a46125de4 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 fa3b720e3..37c84904d 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 3c52852f4..d1656395f 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 1d616aaf9..64f7c29a0 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 f2f6a779b..a706b76d6 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 7364e27cf..324a26ea0 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 1a387538e..3512f5658 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 33e07d605..a788ba597 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 acef2a89b..dba13a57e 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 6281486b2..5e78639a9 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 873db0d40..f58b19ce3 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 8d9c90fe3..ae18594b7 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 21632cd89..60c4f120c 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 f15f26a4e..17c2251c3 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 c31657a71..4a6bb9c83 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 260d65817..ded952d55 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 a96a34afa..2c3b85dc9 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 b23ad8a0b..0bfcaf9b5 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 3dd91c9c6..33408d826 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 b308f5478..28bcc8b83 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 c96bdc1e5..f3a6f3cad 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 bb8e30ce6..9cfc75dc3 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 393e66fe0..08d839bfd 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 8f1706d1e..c85680705 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 f08490fbd..854876615 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 18cf5f7f0..051a970f9 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 61c273745..6e9776180 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 bad7984e9..df09f61fd 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 9b651bc8b..0c7141a62 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 bbb1a3ef8..63abd2be8 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 3d939d885..81840fe11 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 8fc1bca35..00cd50970 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 e4329611d..58d48bac1 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 69939be0d..2868f7b53 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 11a509136..450f2b030 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 dac638d14..2e035269f 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 95a937cca..0dde5474c 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 3678a02ff..195083764 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 2d1498b83..9702ae884 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 1aeb46a98..ef9794dc2 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 f0676a621..4a3927ddf 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 67f9a442b..161e8fc2e 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 47055a042..d862e5acc 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 bc0caec94..2bd4cba8d 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 076c7c86a..313b749fc 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 bcf0e67c5..c009aa1c6 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