Skip to content

Commit da69187

Browse files
committed
chore(ruff): Autofixes for ruff with Python 3.10+
Fixed 3 errors: - src/django_docutils/_internal/types.py: 1 × I001 (unsorted-imports) 1 × UP035 (deprecated-import) - src/django_docutils/lib/transforms/code.py: 1 × UP007 (non-pep604-annotation-union) Found 3 errors (3 fixed, 0 remaining).
1 parent d0661f4 commit da69187

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/django_docutils/_internal/types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
if t.TYPE_CHECKING:
1515
from os import PathLike
16-
17-
from typing_extensions import TypeAlias
16+
from typing import TypeAlias
1817

1918
StrPath: TypeAlias = t.Union[str, "PathLike[str]"] # stable
2019
""":class:`os.PathLike` or :class:`str`"""

src/django_docutils/lib/transforms/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from pygments.token import _TokenType
1818

1919
TokenStream = Iterator[tuple[_TokenType, str]]
20-
TokenGenerator = Iterator[tuple[t.Union[str, int], str]]
20+
TokenGenerator = Iterator[tuple[str | int, str]]
2121

2222

2323
class InlineHtmlFormatter(HtmlFormatter): # type:ignore

0 commit comments

Comments
 (0)