Skip to content

Forbid extra ParamSpec arguments #12024

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 2 commits into from
Jan 28, 2022
Merged

Forbid extra ParamSpec arguments #12024

merged 2 commits into from
Jan 28, 2022

Conversation

sobolevn
Copy link
Member

I've decided to add a note to users that other arguments to ParamSpec are not supported.
Because right now they are allowed. But, they do not make any sense.

See python/typing#1027

@github-actions

This comment has been minimized.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, feel free to merge!
Since ParamSpec does accept these arguments at runtime, it might be worth having a longer message, e.g. "Only the first argument to ParamSpec has defined semantics"

@sobolevn
Copy link
Member Author

Thank you!

@sobolevn sobolevn merged commit 7af46ce into python:master Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants