summaryrefslogtreecommitdiff
path: root/pylint
Commit message (Collapse)AuthorAgeFilesLines
* Add optional `prefer-typing-namedtuple` message (#8681)HEADmainJacob Walls2023-05-162-8/+35
| | | Closes #8660
* [pre-commit.ci] pre-commit autoupdate and simplify ruff config (#8694)pre-commit-ci[bot]2023-05-162-2/+2
| | | | | | | | | | * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.265 → v0.0.267](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.265...v0.0.267) - [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0) --------- Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add new checker `kwarg-superseded-by-positional-arg` and fix a false ↵Mark Byrne2023-05-161-5/+19
| | | | | | | | | | positive (#8644) * Fix a false positive for ``redundant-keyword-arg`` when a function, with a keyword-only-parameter and ``**kwargs``, is called with a positional argument and a keyword argument where the keyword argument has the same name as the positional-only-parameter. * Add new checker ``kwarg-superseded-by-positional-arg`` which emits a warning message for the above scenario. Closes #8558 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix a false negative for ``too-many-arguments`` and positional-only and ↵Mark Byrne2023-05-152-1/+6
| | | | | | | | keyword-only arguments (#8674) Closes #8667
* Regression fix for `unused-variable` false negative (#8684)Zen Lee2023-05-151-0/+6
|
* Load custom plugins when linting in parallel (#8683)Jacob Walls2023-05-142-3/+11
|
* Fix crash when deleting from a dict returned from a call (#8678)Jacob Walls2023-05-121-5/+1
|
* [use-implicit-booleaness] Micro-optimization if some messages are disabledPierre Sassoulas2023-05-031-4/+9
|
* [use-implicit-booleaness] Remove condition that is always false (outdated ↵Pierre Sassoulas2023-05-031-2/+0
| | | | typing hint?)
* [use-implicit-booleaness] Optimization for unknown operatorsPierre Sassoulas2023-05-031-5/+7
|
* [use-implicit-booleaness] Merge the check for string and zero togetherPierre Sassoulas2023-05-031-64/+52
|
* Uniformize message and remove useless details.rstPierre Sassoulas2023-05-031-17/+19
|
* Add applicability notes for `compare-to-empty-string/zero` (#8592)Jason Lau2023-05-031-3/+3
| | | | | | The extension `compare-to-empty-string` is only applicable when the expression being compared is strictly a `str`. The extension `compare-to-zero` is only applicable when the expression being compared is strictly an `int`.
* Switch from ' to " in use-implicit-booleaness-not-comparisonPierre Sassoulas2023-05-031-1/+1
| | | | | Because empty string needs to " because node.as_string() use simple quote.
* Merge the empty-string extensions to 'implicit_booleaness_checker'Pierre Sassoulas2023-05-022-80/+56
|
* Merge the compare-to-zero extensions to 'implicit_booleaness_checker'Pierre Sassoulas2023-05-022-95/+59
|
* Search for pyproject.toml config file in parent dirs (#7163)Mikhail f. Shiryaev2023-04-301-1/+29
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* [primer] Fix commit string generation (#8639)Jacob Walls2023-04-301-2/+3
| | | Follow-up to 87a4d672a8661aa61d5717fd902315d9563e33b6.
* Make sure a ``tool`` table is created in ``toml`` generation (#8638)Daniël van Noord2023-04-301-1/+4
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix false negative for calling module-level function before definition (#8494)Jacob Walls2023-04-291-9/+3
|
* Add home-assistant to primer and remove old external primer (#8612)Jacob Walls2023-04-291-1/+1
|
* Added escaping of vertical bar character in annotation labels (#8610)ViRuSTriNiTy2023-04-261-1/+9
|
* Bump astroid to 3.0.0a1 (#8626)Marc Mueller2023-04-254-4/+16
|
* Drop support for Python 3.7 (#8609)Marc Mueller2023-04-2428-183/+41
| | | | | * Drop support for Python 3.7 * Update py-version + classifier * Update functional tests
* Fix a false positive for ``bad-dunder-name`` when there is a user-defined ↵Mark Byrne2023-04-241-0/+1
| | | | | ``__index__`` method. (#8619) Closes #8613
* Use astroid.Context enum (#8611)Marc Mueller2023-04-241-5/+5
|
* Fix `FunctionDef` isinstance checks (#8607)Marc Mueller2023-04-233-7/+7
|
* Optimize `is_trailing_comma()` (#8606)Jacob Walls2023-04-231-4/+5
| | | Skip is_trailing_comma() call unless `trailing-comma-tuple` enabled
* Clear cache between primer package runsJacob Walls2023-04-231-1/+2
|
* Cache `class_is_abstract()`Jacob Walls2023-04-231-0/+2
| | | | | For one project in the pylint primer (music21), provides 15% speedup linting the entire project.
* Modified all occurences of "a f-string" to "an f-string"Elazrod562023-04-202-3/+3
|
* Minor refactor on type annotation (#8587)Zen Lee2023-04-181-1/+3
|
* Fix FP `used-before-assignment` for statements guarded under same test (#8581)Jacob Walls2023-04-161-0/+35
|
* Improve output of `consider-using-generator` message for `min()` calls with ↵Jacob Walls2023-04-161-1/+5
| | | | `default` keyword (#8582)
* Cope with changes to `Starred` constructorJacob Walls2023-04-161-1/+9
|
* Fix `used-before-assignment` TYPE_CHECKING false negatives (#8431)Zen Lee2023-04-151-20/+62
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Fix false negative for no-value-for-parameter: positional-only args and ↵Mark Byrne2023-04-141-0/+5
| | | | **kwargs (#8575)
* Disable Info linters in definition instead of Run class (#8576)Matus Valo2023-04-144-9/+30
|
* Fix false positive for ``keyword-arg-before-vararg`` (#8571)Mark Byrne2023-04-131-1/+7
| | | | | * Fix false positive for ``keyword-arg-before-vararg`` when a positional-only parameter with a default value precedes ``*args``. Closes #8570
* Fix `unused-import` to check`dummy-variables-rgx` (#8566)RSTdefg2023-04-121-4/+11
| | | | | Resolve #8500 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix false positive for ``positional-only-arguments-expected`` when a ↵Mark Byrne2023-04-091-0/+2
| | | | function contains both a positional-only parameter that has a default value, and ``**kwargs``. (#8556)
* Also check the typealias naming style for TypeAlias variables defined in ↵Yilei "Dolee" Yang2023-04-071-1/+6
| | | | functions. (#8537)
* Fix isinstance-second-argument-not-valid-type for union types with NoneRogdham2023-04-071-5/+8
|
* Fix typelias `invalid-name` false positives for Union variables without ↵Yilei "Dolee" Yang2023-04-071-4/+1
| | | | assignment. (#8541)
* Do not emit `logging-not-lazy` for explicitly concatenated strings. (#8546)Yilei "Dolee" Yang2023-04-071-1/+14
|
* Fix check unused arguments false positive bug (#8542)Théo Battrel2023-04-061-0/+10
| | | | | | | | | | | | | | | | | | | Problem: the special method `__new__` must match the arguments of the `__init__` method even if `__new__` method does not use them. This generate `unused-argument` for the `__new__` method. Fix: the unused arguments check should not be done on the `__new__` method if the `__init__` method is defined in the same class. Update `unused-argument` test to include a check for the case of `__init__` and `__new__` being defined in a class but `__new__` does not use all of the argument. This is fine because `__new__` must have the same argument of `__init__`. Update with a second check in case of `__init__` being not defined in a class. Then the unused arguments check must be done on `__new__`. Fixes https://github.com/pylint-dev/pylint/issues/3670
* Handle patterns in ignored-modules when checking for no-name-in-module (#7579)Daniel Mouritzen2023-04-034-46/+29
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Jared Proffitt <jaredproffitt@gmail.com>
* [pyreverse] Bugfix: strip "/" at the end of the file (#8517)Alvaro Frias2023-04-021-1/+1
| | | | Signed-off-by: Alvaro Frias Garay <alvaro.frias@eclypsium.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add Pyreverse option to exclude standalone nodes (#8520)Nick Drozd2023-04-023-0/+23
| | | | | | | | | | | * Add Pyreverse option to exclude standalone nodes * Add test * Add package test * Fix test names * Clean up test files
* Don't use removed function from ``astroid`` (#8525)Daniël van Noord2023-04-011-5/+11
|