diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-22 20:28:59 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-29 16:44:54 -0400 |
commit | c9938f8f60c0b7cca7a5668807b17badb7861c86 (patch) | |
tree | 6bbdb301a2c8ce4b92866a04703ada96241683b4 /mesonbuild/modules/qt.py | |
parent | 05cfe756f1c2dbd212aa6d30a3879cfe47a7f2fd (diff) | |
download | meson-c9938f8f60c0b7cca7a5668807b17badb7861c86.zip meson-c9938f8f60c0b7cca7a5668807b17badb7861c86.tar.gz meson-c9938f8f60c0b7cca7a5668807b17badb7861c86.tar.bz2 |
move a bunch of imports into TYPE_CHECKING blocks
These are only used for type checking, so don't bother importing them at
runtime.
Generally add future annotations at the same time, to make sure that
existing uses of these imports don't need to be quoted.
Diffstat (limited to 'mesonbuild/modules/qt.py')
-rw-r--r-- | mesonbuild/modules/qt.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py index 81dd3e9..99581a4 100644 --- a/mesonbuild/modules/qt.py +++ b/mesonbuild/modules/qt.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 import os import shutil @@ -23,17 +24,19 @@ from .. import build from .. import coredata from .. import mlog from ..dependencies import find_external_dependency, Dependency, ExternalLibrary -from ..mesonlib import MesonException, File, FileOrString, version_compare, Popen_safe +from ..mesonlib import MesonException, File, version_compare, Popen_safe from ..interpreter import extract_required_kwarg from ..interpreter.type_checking import NoneType from ..interpreterbase import ContainerTypeInfo, FeatureDeprecated, KwargInfo, noPosargs, FeatureNew, typed_kwargs -from ..programs import ExternalProgram, NonExistingExternalProgram +from ..programs import NonExistingExternalProgram if T.TYPE_CHECKING: from . import ModuleState from ..dependencies.qt import QtPkgConfigDependency, QmakeQtDependency from ..interpreter import Interpreter from ..interpreter import kwargs + from ..mesonlib import FileOrString + from ..programs import ExternalProgram QtDependencyType = T.Union[QtPkgConfigDependency, QmakeQtDependency] |