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
add the following to lint.py
lint.py
# pylint: disable=missing-module-docstring, missing-class-docstring from dataclasses import dataclass, field @dataclass class Mamal: name: str age: int mamal_subgroup: str @dataclass class Person(Mamal): name: str age: int mamal_subgroup: str = field(default="primates", init=False) Person("John", 20)
[tool.pylint.messages_control] max-line-length = 140 disable=["fixme", "too-few-public-methods","invalid-name", "useless-return"]
pylint lint.py
************* Module lint lint.py:19:0: E1120: No value for argument 'mamal_subgroup' in constructor call (no-value-for-parameter)
mamal_subgroup
field(default="primates", init=False)
class Person
mamal_subgroup: str = field(default="primates", init=True)
pylint 2.14.1 astroid 2.11.5 Python 3.8.13 (default, Mar 16 2022, 20:38:07) [Clang 13.0.0 (clang-1300.0.29.30)]
macos(12.3.1)
The text was updated successfully, but these errors were encountered:
Thank you for opening an issue. It does look like a duplicate of #5225 so I'm going to keep the previous one.
Sorry, something went wrong.
init=False
E1120 no-value-for-parameter
No branches or pull requests
Bug description
add the following to
lint.py
Configuration
Command used
Pylint output
Expected behavior
mamal_subgroup
is initialised withfield(default="primates", init=False)
inclass Person
mamal_subgroup: str = field(default="primates", init=True)
is used insteadPylint version
OS / Environment
macos(12.3.1)
The text was updated successfully, but these errors were encountered: