We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdd21e3 commit a01ee99Copy full SHA for a01ee99
rubisco/lib/pathlib.py
@@ -23,6 +23,7 @@
23
import os
24
import pathlib
25
import sys
26
+from typing import TYPE_CHECKING
27
28
__all__ = ["Path"]
29
@@ -41,7 +42,7 @@ def normpath(self) -> "Path":
41
42
43
44
# In Python 3.11, parent's @classmethod will catch children.
-if sys.version_info < (3, 12):
45
+if sys.version_info < (3, 12) and not TYPE_CHECKING:
46
# "Inject" the extended methods into the built-in pathlib.Path class.
47
pathlib.Path.normpath = Path.normpath # type: ignore[method-required]
48
Path = pathlib.Path # type: ignore[assignment]
0 commit comments