pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description Minimal Repro, see inline comments for false positive descriptions ```python """My module docstring.""" from collections.abc import Sized from typing import Protocol, TypeVar from typing_extensions import override, TypeAlias...
### Bug description Consider following structure: ``` |_ mymodule |_ __init__.py |_ example.py |_ myclasses.py ``` Where `__init__.py` is empty. `myclasses.py` contains: ```python class ClassA: badClassVariable = 0 ``` And...
### Steps to reproduce ```python # pylint: disable=missing-docstring,too-few-public-methods class MyClass: _all = None @classmethod def all(cls): if not cls._all: cls._all = find_all() return cls._all @classmethod def exist(cls, number): return number...
### Bug description When both assignment branches and usage is nested inside separate with equivalent checks, a used before assignment is not detected. Pylint should detect these as it does,...
### Is your feature request related to a problem? Please describe Yes. The problem is that every linter out there has its own pragma control, leading to a mess if...
### Steps to reproduce 1. Using this test file, `example.py`: ```python from asyncio import subprocess subprocess.create_subprocess_exec('echo', 'hi') ``` 2. Run `pylint example.py` ### Current behavior The following output: ``` ยป...
### Bug description **other.py:** ```python class MyDict(dict): pass MyDict = MyDict() print("item" in MyDict) ``` **main.py:** ```python from other import MyDict print("item" in MyDict) ``` Pylint seems to be confused...
### Bug description ```python # pylint: disable=missing-module-docstring,missing-class-docstring,disallowed-name,unused-argument,too-few-public-methods,missing-function-docstring class Base: def __init__(self): self.foo = "bar" @classmethod def from_dict(cls, values): return cls() class Child(Base): def __init__(self): super().__init__() self.baz = "quz" @classmethod def...
### Steps to reproduce Running Pylint on the following code will produce the error on the last line. ```python import statsmodels.api as sm data = sm.datasets.longley.load_pandas().data properties = ['GNP', 'POP']...
### Bug description Looks like #3670 is not quite solved for classes that dynamically define an `__init__`. While this is probably complex to handle in the general case, `dataclasses` are...