Skip to content
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

Make "non-standard" keywords in methods keyword-only arguments #417

Open
hoxbro opened this issue Dec 19, 2022 · 0 comments
Open

Make "non-standard" keywords in methods keyword-only arguments #417

hoxbro opened this issue Dec 19, 2022 · 0 comments

Comments

@hoxbro
Copy link
Member

hoxbro commented Dec 19, 2022

Some methods in Lumen need different inputs depending on the class it is called from. An example of this could be from_spec, the example below. I would like to see these non-standard keywords being keyword-only arguments, so passing in the wrong arguments is impossible.

lumen/lumen/views/base.py

Lines 267 to 269 in 9580995

def from_spec(
cls, spec: Dict[str, Any] | str, source=None, filters=None, pipeline=None
) -> 'View':

def from_spec(cls, spec: Dict[str, Any] | str) -> 'Auth':

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

No branches or pull requests

1 participant