Skip to content

Commit

Permalink
Fix #180 (#181)
Browse files Browse the repository at this point in the history
Only use typing extensions if truly needed.
We should eventually add a CI test without all the de dependencies, because they probably bring in typing extensions in other versions....
  • Loading branch information
PhilipVinc authored Jul 1, 2024
1 parent 456e06b commit aac1bd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plum/signature.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit aac1bd3

Please sign in to comment.