Skip to content

Commit 54acfa3

Browse files
committed
Rename TypeVar to _WritablePathT
1 parent 4aa2540 commit 54acfa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/pathlib/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
runtime_checkable,
2121
)
2222

23-
_WP = TypeVar("_WP", bound="_WritablePath")
23+
_WritablePathT = TypeVar("_WritablePathT", bound="_WritablePath")
2424

2525

2626
def _explode_path(path: str, parser: "_PathParser") -> tuple[str, list[str]]:
@@ -345,15 +345,15 @@ def readlink(self) -> Self:
345345
"""
346346
raise NotImplementedError
347347

348-
def copy(self, target: _WP, **kwargs: Any) -> _WP:
348+
def copy(self, target: _WritablePathT, **kwargs: Any) -> _WritablePathT:
349349
"""
350350
Recursively copy this file or directory tree to the given destination.
351351
"""
352352
ensure_distinct_paths(self, target)
353353
target._copy_from(self, **kwargs)
354354
return target.joinpath() # Empty join to ensure fresh metadata.
355355

356-
def copy_into(self, target_dir: _WP, **kwargs: Any) -> _WP:
356+
def copy_into(self, target_dir: _WritablePathT, **kwargs: Any) -> _WritablePathT:
357357
"""
358358
Copy this file or directory tree into the given existing directory.
359359
"""

0 commit comments

Comments
 (0)