pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description pyreverse generates same diagram for aggregation and composition. Here is the sample code: ```python # Aggregation class Student: def __init__(self, id): self._id = id def registration_number(self, department_id):...
### Current problem The following produces a SyntaxError: ```python def tomato(is_tasty: bool = True): nonlocal is_tasty ``` ``` python example.py File "/Users/markbyrne/programming/example.py", line 2 nonlocal is_tasty ^^^^^^^^^^^^^^^^^ SyntaxError: name 'is_tasty'...
### Bug description This produces a _using 'x' before assignment_ error: ```python """pylint_false_positive.py""" def test(): try: try: x = None except: x = None raise finally: print("x", x) ``` ###...
### Bug description When using a NewType type definition based on `Dict[str,str]` and using regular dict-access methods, this generates various false positive warnings, e.g. `unsupported-assignment-operation`, `unsubscriptable-object`. Sample code: ``` from...
- [x] Add yourself to CONTRIBUTORS if you are a new contributor. - [x] Add a ChangeLog entry describing what your PR does. - [x] If it's a new feature,...
### Bug description Importing from collections.abc gives off these false positive errors ### Configuration _No response_ ### Command used ```shell pre-commit ``` ### Pylint output ```shell ************* Module stats stats.py:3:0:...
### Bug description If I am trying to OR more than two flags, pylint 2.15.0 fails with "E1131: unsupported operand type(s) for | (unsupported-binary-operation)". This worked with pylint 2.14.1 ```...
### Bug description ```python def function_a() -> None: print("a") def function_b() -> None: print("a") def test1(function_to_choose: str) -> None: match function_to_choose: case "a": function = function_a # line 12 case...
do not report too-few-public-methods for `attr.s`, `attr.dataclass`, `typing.NamedTuple` and similar. example: ```python import attr @attr.dataclass(frozen=True) # pylint-ignore: too-few-public-methods class Foo: ham: str spam: str ``` > @uriva As mentioned by...
Python is liberal about what a float looks like, humans have more problems. A leading or trailing . is easy to miss, and with the wrong font or size, can...