Skip to content

Commit

Permalink
fix: use correct importing for typing_extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Nov 7, 2024
1 parent 0772c78 commit 4f91db8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mistune/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import sys
from typing import (
Any,
Callable,
Expand All @@ -16,9 +17,9 @@
Union,
cast,
)
try:
if sys.version_info >= (3, 11):
from typing import Self
except ImportError:
else:
from typing_extensions import Self

_LINE_END = re.compile(r'\n|$')
Expand Down

0 comments on commit 4f91db8

Please sign in to comment.