pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description ```python """Sample reproduction case for the bug. Please save as case.py.""" import enum class Priority(enum.IntEnum): """Sample class illustrating the bug.""" __slots__ = () LOW = enum.auto() MEDIUM...
### Bug description ```python # TODO: Write good doc strings. def foobar(): """ TODO: Implement """ ``` ### Configuration _No response_ ### Command used ```shell pylint todo.py ``` ### Pylint...
### Bug description ```python """ The following code should lint without errors, but pylint shows: test.py:28:6: E1101: Instance of 'A' has no 'any' member (no-member) """ # pylint: disable=too-few-public-methods class...
### Bug description ```python """ The following code should lint without errors, but pylint shows: test.py:14:8: E1101: Instance of 'A' has no 'y' member (no-member) """ # pylint: disable=too-few-public-methods, pointless-statement...
### Bug description Parameterized generics can't be used for `isinstance`. ```python isinstance(0, list[int]) ``` ``` TypeError: isinstance() argument 2 cannot be a parameterized generic ``` But Pylint doesn't warn about...
### Bug description Despite typing, the `value` setter below seems to remember the last assigned type, and applies it to an unrelated instance with different generic type. ```python from typing...
## Type of Changes | | Type | | --- | ---------------------- | | | :bug: Bug fix | | | :sparkles: New feature | | | :hammer: Refactoring |...
### Current problem `list[int]`, `dict[str, int]`, etc syntax was introduced in Python 3.9. ### Desired solution Unless `py-version` is 3.9+ (or 3.7 with `from __future__ import annotations`), flag it. ###...
### Current problem `from __future__ import annotations` doesn't work on Python versions 3.6 and earlier. ### Desired solution When running with `py-version=3.6` or earlier, flag it. ### Additional context -...
### Bug description ```python type IntOrX = int | X class X: pass ``` ### Configuration _No response_ ### Command used ```shell pylint --py-version=3.12 asdf.py ``` ### Pylint output ```python...