pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description There's an inconsistency with `import-error` between `except ImportError` and `with contextlib.suppress(ImportError)`. With the former Pylint doesn't complain when it can't find the module/package, but with the latter...
### Bug description Probably related to https://github.com/PyCQA/pylint/issues/6986 When parsing the following file: https://github.com/ddnet/ddnet/blob/f8dccb8a122aff04b7b779157d342c265665b5c7/datasrc/compile.py The code is from this PR https://github.com/ddnet/ddnet/pull/5210 ### Command used The job we use in our CI...
### Bug description ``` import pandas as pd df = pd.DataFrame([[1]], columns=['a']) df['a'].map('{0:+.2f}'.format).astype(str) # pylint: disable=consider-using-f-string ``` ### Configuration _No response_ ### Command used ```shell pylint a.py ``` ### Pylint...
### Question ## Description I've written a checker plugin and (with quite a bit of effort) written a simple unit test for it. After struggling with the unittest to make...
### Current problem Right now pylint is displaying the help if called without argument. We could also default to the current directory i.e. ``pylint`` would be equivalent to ``pylint .``....
Originally reported by: **Robert Spier (BitBucket: [robert_spier](http://bitbucket.org/robert_spier))** --- Parallelism (--jobs) changes the output of pylint. It's not just the order of the tests, --jobs=2 outputs 18468 lines of output compared...
### Bug description I think I'm getting a spurious undefined-loop-variable warning when: - walrus expression in 'if' block of list comprehension - loop variable in list comprehension (`x`, here) is...
### Bug description ```python from pydantic import validator, BaseModel class Test(BaseModel): a_field: int @validator def some_validator(cls, value): return value ``` This produces the error below, although pydantic's `validator` does indeed...
### Bug description That check doesn't seem to check if the parent class actually defines enumeration members. This happens only if the parent class is defined in a differen module....
I have a similar issue, using pylint 2.14.5 and Python 3.8 on this minimal example: ``` class Block: def __init__(self): self._cacheDir = None @property def cacheDir(self): if self._cacheDir is None:...