Skip to content

Include keyword only args when generating signatures in stubgenc #17448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add a test case
  • Loading branch information
ericmarkmartin committed Jun 29, 2024
commit b9c4348f8e30d69bb507accf65cdadfa84786d2f
9 changes: 9 additions & 0 deletions test-data/unit/stubgen.test
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,15 @@ def g(x, *, y=1, z=2): ...
def f(x, *, y: int = 1) -> None: ...
def g(x, *, y: int = 1, z: int = 2) -> None: ...

[case testKeywordOnlyArg_inspect]
def f(x, *, y=1): ...
def g(x, *, y=1, z=2): ...
def h(x, *, y, z=2): ...
[out]
def f(x, *, y: int = ...): ...
def g(x, *, y: int = ..., z: int = ...): ...
def h(x, *, y, z: int = ...): ...

[case testProperty]
class A:
@property
Expand Down
Loading