-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Bug: multiple values for keyword arguments #3593
Comments
Hi @embecka! This is not a bug but a conscious design decision. It is documented here. Litestar considers these parameters "reserved" for use by Litestar itself. To resolve possible naming issues, you can simply provide an alternative injection name for your parameters. In case of the dependencies, this would simply mean using a different name, and for other parameters, the docs have a link how to use the renaming feature |
Sorry for the confusion @embecka, I should have read your example more carefully. Yes, this is indeed a bug and your suggestion would be the proper fix :) |
…ignatures don't clash with model signature (#3605) * Ensure signature model internal function signatures don't clash with model signature
This issue has been closed in #3605. The change will be included in the upcoming patch release. |
…ignatures don't clash with model signature (#3605) * Ensure signature model internal function signatures don't clash with model signature
A fix for this issue has been released in v2.14.0 |
Description
Function parameters clashes with keyword arguments in this function or in another. More places in the source code may be affected.
One possible solution is to declare
kwargs
argument askwargs: dict[str, Any]
instead of**kwargs: Any
to separate those namespaces.URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
No response
Logs
Litestar Version
2.9.0
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: