Skip to content

Commit dec5871

Browse files
committed
reformat
1 parent cf89535 commit dec5871

1 file changed

Lines changed: 35 additions & 37 deletions

File tree

stdlib/pathlib/__init__.pyi

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -29,33 +29,32 @@ if sys.version_info >= (3, 13):
2929
__all__ += ["UnsupportedOperation"]
3030

3131
class PurePath(PathLike[str]):
32-
if sys.version_info >= (3, 15):
33-
pass
34-
elif sys.version_info >= (3, 13):
35-
__slots__ = (
36-
"_raw_paths",
37-
"_drv",
38-
"_root",
39-
"_tail_cached",
40-
"_str",
41-
"_str_normcase_cached",
42-
"_parts_normcase_cached",
43-
"_hash",
44-
)
45-
elif sys.version_info >= (3, 12):
46-
__slots__ = (
47-
"_raw_paths",
48-
"_drv",
49-
"_root",
50-
"_tail_cached",
51-
"_str",
52-
"_str_normcase_cached",
53-
"_parts_normcase_cached",
54-
"_lines_cached",
55-
"_hash",
56-
)
57-
else:
58-
__slots__ = ("_drv", "_root", "_parts", "_str", "_hash", "_pparts", "_cached_cparts")
32+
if sys.version_info < (3, 15):
33+
if sys.version_info >= (3, 13):
34+
__slots__ = (
35+
"_raw_paths",
36+
"_drv",
37+
"_root",
38+
"_tail_cached",
39+
"_str",
40+
"_str_normcase_cached",
41+
"_parts_normcase_cached",
42+
"_hash",
43+
)
44+
elif sys.version_info >= (3, 12):
45+
__slots__ = (
46+
"_raw_paths",
47+
"_drv",
48+
"_root",
49+
"_tail_cached",
50+
"_str",
51+
"_str_normcase_cached",
52+
"_parts_normcase_cached",
53+
"_lines_cached",
54+
"_hash",
55+
)
56+
else:
57+
__slots__ = ("_drv", "_root", "_parts", "_str", "_hash", "_pparts", "_cached_cparts")
5958
if sys.version_info >= (3, 13):
6059
parser: ClassVar[types.ModuleType]
6160
def full_match(self, pattern: StrPath, *, case_sensitive: bool | None = None) -> bool: ...
@@ -98,16 +97,15 @@ class PurePath(PathLike[str]):
9897
@deprecated("Deprecated since Python 3.14; will be removed in Python 3.19. Use `Path.as_uri()` instead.")
9998
def as_uri(self) -> str: ...
10099
def is_absolute(self) -> bool: ...
101-
if sys.version_info >= (3, 15):
102-
pass
103-
elif sys.version_info >= (3, 13):
104-
@deprecated(
105-
"Deprecated since Python 3.13; will be removed in Python 3.15. "
106-
"Use `os.path.isreserved()` to detect reserved paths on Windows."
107-
)
108-
def is_reserved(self) -> bool: ...
109-
else:
110-
def is_reserved(self) -> bool: ...
100+
if sys.version_info < (3, 15):
101+
if sys.version_info >= (3, 13):
102+
@deprecated(
103+
"Deprecated since Python 3.13; will be removed in Python 3.15. "
104+
"Use `os.path.isreserved()` to detect reserved paths on Windows."
105+
)
106+
def is_reserved(self) -> bool: ...
107+
else:
108+
def is_reserved(self) -> bool: ...
111109
if sys.version_info >= (3, 14):
112110
def is_relative_to(self, other: StrPath) -> bool: ...
113111
else:

0 commit comments

Comments
 (0)