pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description when a project holds a module name that shadows builtin module name, pylist fails on [`no-member`](https://pylint.pycqa.org/en/latest/messages/error/no-member.html), when clearly this is not the case. ## reproduction given 2...
### Bug description Hello, I have a simple class inheriting from PyGObject's `Gtk.Window` class. Pylint cannot `Gtk.Window`'s `add` and `show_all` members, yet the code runs fine: ```Python """ The main...
Given code like: ```python mm = jax.tree_map(lambda x, y: x + y, f, f) ``` Consider having a pylint rule that suggests replacing it with: ```python mm = jax.tree_map(operator.add, f,...
## Type of Changes | | Type | | --- | ---------------------- | | ✓ | :sparkles: New feature | ## Description Closes #4913
### Steps to reproduce 1. Put this code in test.py: ```python from typing import List, NewType a = NewType("a", List[int]) def fun() -> a: """Some function.""" data = [1, 2,...
This is a weird interaction between the typing library and pylint, so I'm not sure if this is the right place to file the bug, but here goes. ### Steps...
False positive `undefined-loop-variable` in function signature when the typing match a variable name
### Bug description Consider the following file a.py ```python from typing import List def parse_dict(dict_object: List[dict], name: str) -> dict: for dict in dict_object: if dict.get("name") == name: return dict...
```python def my_func(x): if x: pass else: # pylint: disable=protected-access return x._foo ``` The disable has no effect here and a warning is generated. If any statement is insert between...
### Steps to reproduce script: ```python import os # pylint: disable=unused-import from sys import exit print("Hi") ``` If you run plain `pylint` on this, you get "W0611: Unused import os...
### Steps to reproduce Run pylint on the following file: ```py """Minimal repro for pylint's not-an-iterable error. """ from typing import List import attr class Model(object): """Basic model showing pylint's...