Skip to content

Commit

Permalink
fix: importing Self from typing_extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Oct 24, 2024
1 parent f7db503 commit 0772c78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies = [
]
license = {text = "BSD-3-Clause"}
dynamic = ["version"]
requires-python = ">=3.7"
requires-python = ">=3.8"
readme = "README.rst"
classifiers = [
"Development Status :: 4 - Beta",
Expand Down
4 changes: 0 additions & 4 deletions src/mistune/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
Documentation: https://mistune.lepture.com/
"""

try:
import typing_extensions
except ImportError:
pass
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union, Literal
from .block_parser import BlockParser
from .core import BaseRenderer, BlockState, InlineState
Expand Down
5 changes: 4 additions & 1 deletion src/mistune/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
Type,
TypeVar,
Union,
Self,
cast,
)
try:
from typing import Self
except ImportError:
from typing_extensions import Self

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

Expand Down

0 comments on commit 0772c78

Please sign in to comment.