summaryrefslogtreecommitdiff
path: root/mesonbuild/msubprojects.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-07-03 12:41:39 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-07-19 18:31:37 -0400
commit0bb1647fd15cc112098daf9961b2e01cb4e9cd23 (patch)
treecab2094c676a66e3eae55cd16e3f42ae7031e264 /mesonbuild/msubprojects.py
parentcff2fb5950cb37b01df5046cc256826449b3abaa (diff)
downloadmeson-0bb1647fd15cc112098daf9961b2e01cb4e9cd23.tar.gz
move various bits of type-checking only code to TYPE_CHECKING blocks
Mostly detected with flake8-type-checking. Also quote T.cast() first arguments, since those are not affected by future annotations.
Diffstat (limited to 'mesonbuild/msubprojects.py')
-rwxr-xr-xmesonbuild/msubprojects.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index 3ecfba18f..d1b51f048 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -16,12 +16,14 @@ import zipfile
from . import mlog
from .ast import IntrospectionInterpreter, AstIDGenerator
from .mesonlib import quiet_git, GitException, Popen_safe, MesonException, windows_proof_rmtree
-from .wrap.wrap import (Resolver, WrapException, ALL_TYPES, PackageDefinition,
+from .wrap.wrap import (Resolver, WrapException, ALL_TYPES,
parse_patch_url, update_wrap_file, get_releases)
if T.TYPE_CHECKING:
from typing_extensions import Protocol
+ from .wrap.wrap import PackageDefinition
+
SubParsers = argparse._SubParsersAction[argparse.ArgumentParser]
class Arguments(Protocol):