diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-01 23:55:42 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-07 19:09:50 -0500 |
commit | c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e (patch) | |
tree | e2e782b9d7883b96a1bcecc13ddc51d6656bdf20 /mesonbuild/dependencies | |
parent | a009eacc65ddb447edcfc9fd317ad828d9b3353a (diff) | |
download | meson-c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e.zip meson-c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e.tar.gz meson-c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e.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/dependencies')
-rw-r--r-- | mesonbuild/dependencies/pkgconfig.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index 73f2e60..55a364c 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -11,9 +11,10 @@ # 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, sort_libpaths, DependencyTypeName -from ..mesonlib import MachineChoice, OptionKey, OrderedSet, PerMachine, Popen_safe +from ..mesonlib import OptionKey, OrderedSet, PerMachine, Popen_safe from ..programs import find_external_program, ExternalProgram from .. import mlog from pathlib import PurePath @@ -24,6 +25,7 @@ import typing as T if T.TYPE_CHECKING: from ..environment import Environment + from ..mesonlib import MachineChoice from .._typing import ImmutableListProtocol class PkgConfigDependency(ExternalDependency): |