pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description Hello, The following raise an unexpected warning. ```python from __future__ import annotations class A: class B: pass class C: b: B # undefined-variable ``` In Python 3.9,...
### Bug description If module has both .py and .pyi files available, .py file is always used according to the code added in pull request pylint-dev/astroid#2182 Unfortunately, this doesn't always...
### Bug description The behavior described in [#9193](https://github.com/pylint-dev/pylint/issues/9193) is still observable with pylint 3.0.3 for classes. ```python class Foo[T]: def __init__(self, value: T): self.value = value x = Foo[int](1) ```...
### Steps to reproduce 1. Use `pylint -E` on a file containing this piece of code: ```python class FoobarException(Exception): foobar = None try: pass except Exception as ex: if isinstance(ex,...
### Bug description When trying to have a method that read from class variable that can be type or instance of that type pylint incorrectly. First issue is in line...
### Steps to reproduce this code ```python from PyQt4 import QtGui ... aComboBox = QtGui.QComboBox(self) aList = [6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28] for i in aList: aComboBox.addItem(str(i)) fontSizeCombo.activated[str].connect(self.slotOnActivated) ``` where brackets indicate the overloaded...
### Current problem PYLINTHOME is actually cache-dir, but you can only set it via an environment-variable: ``` export PYLINTHOME="/var/cache/pylint" ``` while other tools like pytest and mypy allow to set...
Iβm a little unclear on how to disable the message for select occurrences, while keeping the option enabled in general. [The docs](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/duplicate-code.html) donβt mention that detail either. For example, suppose...
### Bug description When running pylint on the following code: ```python from google.protobuf import any_pb2 isinstance("foo", any_pb2.Any) ``` Throws a linter warning since protobuf==3.20.0 (It still worked fine with 3.19.4)...
### Bug description Python 3.11 added `Never` as an alias of `NoReturn`. The signature of `assert_never` is `assert_never(__x: Never) -> Never` (personally, I wish had been `assert_never(__x: Never) -> NoReturn`,...