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

Unknown keyword arguments silently ignored #324

Open
Helveg opened this issue Oct 27, 2022 · 2 comments
Open

Unknown keyword arguments silently ignored #324

Helveg opened this issue Oct 27, 2022 · 2 comments

Comments

@Helveg
Copy link

Helveg commented Oct 27, 2022

When passing additional, or misspelled, keyword arguments to CORS, and probably elsewhere, they are silently ignored.

This means that a CORS(app, rigins=["mydomain.com"], send_wildcard=True) would produce false positive * wildcards for any domain.

Is there a design reason that leftover unknown keyword arguments can't be raised as an error?

@corydolphin
Copy link
Owner

Is there a design reason that leftover unknown keyword arguments can't be raised as an error?

I don't recall if this was an intentional decision I made adhering too closely to Postel's Law, or ease/laziness. Either way, I now feel strongly this was the wrong decision :-) Changing this to be explicit would be a big improvement, though may require a semver bump.

I'd love to see it happen, in addition to real, strict MyPy support for this project. I'd be happy to review contributions, and or grant access to the project to you or others to help accomplish this.

@Helveg
Copy link
Author

Helveg commented Nov 28, 2022

Great, I've been on a bit of a type-hinting-bandwagon-spree lately so I'll see if I find time for this next weekend :) I'll make 2 separate PRs for it!

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

2 participants