Skip to content

Commit

Permalink
Add fallback import for TypeGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
lieryan committed Mar 11, 2024
1 parent 0d32835 commit 2935d13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pylsp_rope/typing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import sys
from typing import List, Dict, Optional, NewType, Any, Union
from typing_extensions import TypeGuard
try:
from typing import TypeGuard
except ImportError:
from typing_extensions import TypeGuard


if sys.version_info >= (3, 8):
Expand Down

0 comments on commit 2935d13

Please sign in to comment.