Skip to content

Commit

Permalink
chore: Refine imports to use t namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Jan 4, 2025
1 parent 255ab1d commit 9fa888c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/django_docutils/_internal/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Union
import typing as t

if TYPE_CHECKING:
if t.TYPE_CHECKING:
from os import PathLike

from typing_extensions import TypeAlias

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

StrOrBytesPath: TypeAlias = Union[
StrOrBytesPath: TypeAlias = t.Union[
str,
bytes,
"PathLike[str]",
Expand Down
4 changes: 2 additions & 2 deletions src/django_docutils/lib/metadata/tests/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import TYPE_CHECKING
import typing as t

from django.utils.encoding import force_bytes
from docutils.core import publish_doctree
Expand All @@ -14,7 +14,7 @@
)
from django_docutils.lib.settings import DJANGO_DOCUTILS_LIB_RST

if TYPE_CHECKING:
if t.TYPE_CHECKING:
import pathlib


Expand Down
4 changes: 2 additions & 2 deletions src/django_docutils/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from __future__ import annotations

import re
from typing import TYPE_CHECKING
import typing as t

from docutils import nodes

if TYPE_CHECKING:
if t.TYPE_CHECKING:
from collections.abc import Generator

# \x00 means the "<" was backslash-escaped (from sphinx)
Expand Down

0 comments on commit 9fa888c

Please sign in to comment.