Skip to content

Commit

Permalink
Merge pull request #227 from abravalheri/missing-stub
Browse files Browse the repository at this point in the history
Add some missing type annotations
  • Loading branch information
jaraco authored Jul 26, 2024
2 parents 6491614 + d3cefca commit 04cdd83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/227.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add type hints for .with_name, .suffix, .with_stem.
4 changes: 4 additions & 0 deletions path/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class Path(str):
def expand(self: Self) -> Self: ...
@property
def stem(self) -> str: ...
def with_stem(self: Self, stem: str) -> Self: ...
@property
def suffix(self: Self) -> Self: ...
@property
def ext(self) -> str: ...
def with_suffix(self: Self, suffix: str) -> Self: ...
Expand All @@ -82,6 +85,7 @@ class Path(str):
def parent(self: Self) -> Self: ...
@property
def name(self: Self) -> Self: ...
def with_name(self: Self, name: str) -> Self: ...
def splitpath(self: Self) -> tuple[Self, str]: ...
def splitdrive(self: Self) -> tuple[Self, Self]: ...
def splitext(self: Self) -> tuple[Self, str]: ...
Expand Down

0 comments on commit 04cdd83

Please sign in to comment.