Skip to content

Commit

Permalink
Fixed Pyright error
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Jan 29, 2025
1 parent 897d69a commit a5b4e55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/anyio/_core/_fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
TYPE_CHECKING,
Any,
AnyStr,
ClassVar,
Final,
Generic,
overload,
Expand All @@ -27,6 +28,8 @@
from ..abc import AsyncResource

if TYPE_CHECKING:
from types import ModuleType

from _typeshed import OpenBinaryMode, OpenTextMode, ReadableBuffer, WriteableBuffer
else:
ReadableBuffer = OpenBinaryMode = OpenTextMode = WriteableBuffer = object
Expand Down Expand Up @@ -386,7 +389,7 @@ def as_uri(self) -> str:
return self._path.as_uri()

if sys.version_info >= (3, 13):
parser = pathlib.Path.parser
parser: ClassVar[ModuleType] = pathlib.Path.parser

@classmethod
def from_uri(cls, uri: str) -> Path:
Expand Down

0 comments on commit a5b4e55

Please sign in to comment.