We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from dataclasses import dataclass from pydantic import BaseModel class FrozenPydanticModel(BaseModel): class Config: frozen = True @dataclass(frozen=True) class FrozenDataclass: pass class CombinedDataclassModel(FrozenPydanticModel, FrozenDataclass): attr: int CombinedDataclassModel(attr=1)
This raises an unexpected keyword argument in pylint for attr. This is because astroid doesn't build the __init__ of CombinedDataclassModel correctly.
pylint
attr
astroid
__init__
CombinedDataclassModel
Set attr as an expected argument in the __init__ of CombinedDataclassModel. This is because the frozen BaseModel allows this pattern.
BaseModel
Version: 2.12.x
2.12.x
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce
This raises an unexpected keyword argument in
pylint
forattr
. This is becauseastroid
doesn't build the__init__
ofCombinedDataclassModel
correctly.Expected behavior
Set
attr
as an expected argument in the__init__
ofCombinedDataclassModel
. This is because the frozenBaseModel
allows this pattern.Version:
2.12.x
The text was updated successfully, but these errors were encountered: