diff options
| author | Eli Schwartz <eschwartz@archlinux.org> | 2022-04-07 22:54:55 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-05-23 16:44:08 -0400 |
| commit | 1c52ac4e156c2f21d44cf800b112c5ea26878185 (patch) | |
| tree | 73e782aab6354ed731174100593577d105eea23f /mesonbuild/interpreterbase | |
| parent | e5c7dc199a849c2d548e41900f560f554fe5665d (diff) | |
| download | meson-1c52ac4e156c2f21d44cf800b112c5ea26878185.tar.gz | |
move various imports into TYPE_CHECKING blocks for neatness
Diffstat (limited to 'mesonbuild/interpreterbase')
| -rw-r--r-- | mesonbuild/interpreterbase/_unholder.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/interpreterbase/_unholder.py b/mesonbuild/interpreterbase/_unholder.py index 7157d174a..4f1edc102 100644 --- a/mesonbuild/interpreterbase/_unholder.py +++ b/mesonbuild/interpreterbase/_unholder.py @@ -11,11 +11,17 @@ # 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 .baseobjects import InterpreterObject, MesonInterpreterObject, ObjectHolder, TYPE_var, HoldableTypes +import typing as T + +from .baseobjects import InterpreterObject, MesonInterpreterObject, ObjectHolder, HoldableTypes from .exceptions import InvalidArguments from ..mesonlib import HoldableObject, MesonBugException +if T.TYPE_CHECKING: + from .baseobjects import TYPE_var + def _unholder(obj: InterpreterObject) -> TYPE_var: if isinstance(obj, ObjectHolder): assert isinstance(obj.held_object, HoldableTypes) |
