diff --git a/plum/signature.py b/plum/signature.py index 2819048..5c562ab 100644 --- a/plum/signature.py +++ b/plum/signature.py @@ -1,10 +1,16 @@ import inspect import operator +import sys from copy import copy from typing import Any, Callable, ClassVar, List, Set, Tuple, Union +# TODO: When minimum version required is 3.11, remove typing extensions +if sys.version_info >= (3, 11): # pragma: specific no cover 3.7 3.8 3.9 3.10 + from typing import Self +else: # pragma: specific no cover 3.11 + from typing_extensions import Self + from rich.segment import Segment -from typing_extensions import Self import beartype.door from beartype.peps import resolve_pep563 as beartype_resolve_pep563