pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description In the example below, it's completely normal for the `Command` class to access a private member of the `Service` class. ```python class Service: class Command: def __init__(self,...
Closes #10149
### Bug description Based on[ SO question here](https://stackoverflow.com/questions/74467217/logic-behind-pylint-error-e1128-assignment-from-none). `assignment-from-none` is emitted where `func` does not necessarily returns `None` consider this `example.py` file to reproduce the error: ```python def get_func(param): if...
### Bug description ```python """ With the new LangChain version (0.3.0) there is support for Pydantic V2, they changed all the models to use Pydantic V2, and some of our...
### Bug description ```python cfg_ = configparser.ConfigParser() cfg_.read(USER_HGRC) ``` At `.read`, basedpyright recommended setting shows `warning: Result of call expression is of type "list[str]" and is not used; assign to...
### Bug description ```python In 3.14, evaluation of annotations is deferred. Pylint raises undefined-variable for the field annotation below, but in 3.14 this is a false positive. class X: x:...
I came across a diagram that seemed to have too many arrows and too many kinds of arrows. The code is something like this: ```python class P: pass class A:...
### Bug description I have a project with this structure: ``` pyreverse_test __init__.py a.py b.py ``` a.py contains: ```python class A: def __init__(self) -> None: self.var = 2 ``` b.py...
## Type of Changes | | Type | | --- | ---------------------- | | ✓ | :bug: Bug fix | ## Description Closes #10365
The spirit of `unidiomatic-typecheck` is to flag unidiomatic typechecks. This is unidiomatic: ``` type(x) is type(y) ``` It should be one of: ``` isinstance(x, type(y)) issubclass(type(x), type(y)) ```