diff --git a/clorm/orm/_typing.py b/clorm/orm/_typing.py index da8c815..d317904 100644 --- a/clorm/orm/_typing.py +++ b/clorm/orm/_typing.py @@ -1,5 +1,5 @@ -import sys import inspect +import sys from inspect import FrameInfo from typing import Any, Dict, ForwardRef, Optional, Tuple, Type, TypeVar, Union, _eval_type, cast diff --git a/requirements.txt b/requirements.txt index 836997d..5f1b583 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ clingo>=5.5.1 -typing_extensions; python_version < '3.8' +typing_extensions; python_version < '3.11' dataclasses; python_version == '3.6' diff --git a/tests/test_mypy_query.py b/tests/test_mypy_query.py index ed6333c..05e3d92 100644 --- a/tests/test_mypy_query.py +++ b/tests/test_mypy_query.py @@ -1,6 +1,10 @@ +import sys from typing import Tuple -from typing_extensions import reveal_type +if sys.version_info < (3, 11): + from typing_extensions import reveal_type +else: + from typing import reveal_type from clorm import FactBase, Predicate from clorm.orm._queryimpl import GroupedQuery, UnGroupedQuery