-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Convert parameters popped from **kwargs to keyword-only #10025
Labels
Comments
This is the list flagged by pydoctor:
I haven't investigated most of these yet, beyond confirming that while they're not ordinary parameters, they can be passed as keyword arguments. So it's possible that some of them will be addressed by using |
In changeset d17f169
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While working on #10021, I found several functions/methods in Twisted which document parameters with
@param
but implement them by popping them from**kwargs
.While it would be possible to fix the docstrings, it may be better to convert these to keyword-only parameters. The main advantage is that having separate parameters means each parameter can receive an individual type annotation.
Another advantage is that for functions/methods that support a fixed set of keyword parameters, we can remove the
**kargs
. That way, passing a non-existing parameter triggers an error instead of being silently ignored, which helps catching bugs.Searchable metadata
The text was updated successfully, but these errors were encountered: