Unexpected keyword argument
See original GitHub issueHello, With the latest release of mypy and the master branch of sqlalchemy-stubs, this code causes mypy to raise a “error: Unexpected keyword argument “name” for “User”” Is there smth I can do to avoid these errors ?
from sqlalchemy import CheckConstraint, Column, Integer, String
from sqlalchemy.ext.declarative import as_declarative
@as_declarative()
class Base:
pass
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
name = Column(String)
user = User(name="xx")
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Why am I getting this unexpected keyword argument TypeError?
I've googled "unexpected keyword argument", but I can never find a definition; only other stackoverflow articles. What is wrong with my code ...
Read more >unexpected-keyword-arg / E1123 - Pylint 2.16.0-dev ...
Description: Used when a function call passes a keyword argument that doesn't correspond to one of the function's parameter names. ... Created by...
Read more >Unexpected Keyword Argument in Python - Codeigo
This is a Python TyperError that occurs when we try to call a function with a keyword argument that is not expected by...
Read more >Accepting arbitrary keyword arguments in Python
Let's make a function that accepts arbitrary keyword arguments. ... TypeError: say_things() got an unexpected keyword argument 'ducks' ...
Read more >How to debug task "got an unexpected keyword argument"
Hello list,. I wondering if someone might have a bright idea how I can debug the following error, which get periodically in production....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
But then I have a ton of "“error: Unexpected keyword argument “name” for “User”” errors. It would require me an hour of “type: ignore” to silence them ^^. I guess The only way is to wait for #5 to be resolved.