Skip to content

Commit 7441c3d

Browse files
committed
make Self work either way
Signed-off-by: Emre Şafak <[email protected]>
1 parent 52d44cb commit 7441c3d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/virtualenv/discovery/cache.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
from abc import ABC, abstractmethod
44
from typing import Any
55

6-
from typing_extensions import Self
6+
try:
7+
from typing import Self # Python ≥ 3.11
8+
except ImportError:
9+
from typing_extensions import Self # Python < 3.11
710

811

912
class Cache(ABC):

0 commit comments

Comments
 (0)