summaryrefslogtreecommitdiff
path: root/pylint
Commit message (Collapse)AuthorAgeFilesLines
* Bump pylint to 2.17.4, update changelogv2.17.4Pierre Sassoulas2023-05-061-1/+1
| | | | Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Make sure a ``tool`` table is created in ``toml`` generation (#8638) (#8640)github-actions[bot]2023-04-301-1/+4
| | | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 434d49f69a65adf75c86dd9629ffbb6d8300df67) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Added escaping of vertical bar character in annotation labels (#8610) (#8631)Andreas Finkler2023-04-271-1/+9
|
* Fix a false positive for ``bad-dunder-name`` when there is a user-defined ↵github-actions[bot]2023-04-241-0/+1
| | | | | | | | | ``__index__`` method. (#8619) (#8622) Closes #8613 (cherry picked from commit f223c6de3a39eae6d1c76e30b55da28639dd8777) Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Bump pylint to 2.17.3, update changelog (#8620)v2.17.3Pierre Sassoulas2023-04-241-1/+1
|
* Improve output of `consider-using-generator` message for `min()` calls with ↵github-actions[bot]2023-04-171-1/+5
| | | | | | | `default` keyword (#8582) (#8583) (cherry picked from commit 4a485e28f0a5118b37550123c79f1f6d0dec42a4) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Fix false positive for ``keyword-arg-before-vararg`` (#8571) (#8578)github-actions[bot]2023-04-151-1/+7
| | | | | | | | | * Fix false positive for ``keyword-arg-before-vararg`` when a positional-only parameter with a default value precedes ``*args``. Closes #8570 (cherry picked from commit 56fa5dce747a46f1dcba6eca003bb22fcc347247) Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Fix `unused-import` to check`dummy-variables-rgx` (#8566) (#8568)github-actions[bot]2023-04-121-4/+11
| | | | | | | | Resolve #8500 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 0cd41b1fb15e31eb311b61f93bc27f7cacc2f7ac) Co-authored-by: RSTdefg <34202999+RSTdefg@users.noreply.github.com>
* Fix false positive for ``positional-only-arguments-expected`` when a ↵github-actions[bot]2023-04-101-0/+2
| | | | | | | function contains both a positional-only parameter that has a default value, and ``**kwargs``. (#8556) (#8560) (cherry picked from commit db17860fd61154c59f3acc13ff34b120cc5ba091) Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Fix isinstance-second-argument-not-valid-type for union types with NoneRogdham2023-04-071-5/+8
| | | | (cherry picked from commit b5f2b01635edd23fecc1546f3fdb2a41e6a51995)
* Fix typelias `invalid-name` false positives for Union variables without ↵github-actions[bot]2023-04-071-4/+1
| | | | | | | assignment. (#8541) (#8548) (cherry picked from commit cb255eaaed8bba6bec1f7bf5d4cde15821c1dd46) Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
* Do not emit `logging-not-lazy` for explicitly concatenated strings. (#8546)Yilei "Dolee" Yang2023-04-071-1/+14
| | | | (cherry picked from commit eeddd667a6e73ef58fb47cdda154c1751f0ffe71)
* Fix check unused arguments false positive bug (#8542) (#8545)github-actions[bot]2023-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 (cherry picked from commit 156da64d0fb4c06e15c5b619b91ce550d594a770) Co-authored-by: Théo Battrel <theo.util@protonmail.ch>
* Bump pylint to 2.17.2, update changelog (#8533)v2.17.2Pierre Sassoulas2023-04-031-1/+1
|
* [pyreverse] Bugfix: strip "/" at the end of the file (#8517) (#8528)github-actions[bot]2023-04-021-1/+1
| | | | | | | Signed-off-by: Alvaro Frias Garay <alvaro.frias@eclypsium.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 6ad17fb758361f50210f4cb5a4fd34494034f4e0) Co-authored-by: Alvaro Frias <alvaro.frias@eclypsium.com>
* Don't use removed function from ``astroid`` (#8525) (#8526)github-actions[bot]2023-04-021-5/+11
| | | | | (cherry picked from commit f7bd67604f395cd50734b9559acc37ae5d34ce4b) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* [Backport maintenance/2.17.x] Allow integers in TypeAlias names. (#8507)github-actions[bot]2023-03-281-1/+3
| | | | Co-authored-by: Stephane Odul <1504511+sodul@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix `unnecessary-lambda` false positive for lambdas using its parameters in ↵github-actions[bot]2023-03-281-0/+8
| | | | | | | | | their body (#8498) (#8506) Fixes #8496 (cherry picked from commit b62143611a4713e4729ce9ecb6398f5f94d82f1a) Co-authored-by: cherryblossom <31467609+cherryblossom000@users.noreply.github.com>
* Don't consider ``Union`` to always be a type alias (#8489)Daniël van Noord2023-03-231-1/+7
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 07127ee75f3456920ff5117cdbaf8697744b6cfc)
* Bump pylint to 2.17.1, update changelog (#8482)v2.17.1Pierre Sassoulas2023-03-221-1/+1
|
* Fix incorrect preferred-modules matches (#8481)github-actions[bot]2023-03-221-1/+9
| | | | | | Co-authored-by: d33bs <dave.bunten@cuanschutz.edu> (cherry picked from commit d64c0cc1484b0cbea5fd3a9dfac4c0d6ddc7d1aa) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Deprecate redundant type checking guard utils (#8433) (#8439)github-actions[bot]2023-03-124-22/+42
| | | | | (cherry picked from commit b968fa062f801626426ef399401c4530e13fcc49) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Add Python 3.8+ `asyncSetUp` to "defining-attr-methods" list (#8403) (#8438)github-actions[bot]2023-03-111-1/+7
| | | | | (cherry picked from commit b312b9a66472e17d02461258d2156d670481a7f6) Co-authored-by: Samuel FORESTIER <HorlogeSkynet@users.noreply.github.com>
* Fix a crash when `TYPE_CHECKING` is used without importing it (#8435) (#8436)github-actions[bot]2023-03-111-1/+4
| | | | | (cherry picked from commit 4c56ba82d7aac50b1ea34e929833c91418e1d117) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Clear LRU caches on pylint utilities (#8420) (#8427)github-actions[bot]2023-03-102-1/+22
| | | | | (cherry picked from commit ab20812ad0e9ca17cc3bc32dbf34be575dcea502) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Bump pylint to 2.17.0, update changelog (#8395)Pierre Sassoulas2023-03-073-3/+3
|
* Use UninferableBase instead of UninferableDaniel van Noord2023-03-0717-81/+87
|
* Upgrade to astroid 2.15.0 (#8387)Pierre Sassoulas2023-03-074-9/+9
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Accept values of the form ``<class name>.<attribute name>`` for the ↵Mark Byrne2023-03-031-6/+17
| | | | | | | | `exclude-protected` list (#8364) Closes #7343 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [pre-commit] Transition from flake8/autoflake to ruff (#8372)Pierre Sassoulas2023-03-021-3/+4
| | | | | ruff is faster and support pyproject.toml. flake8-typing-import is not implemented but it checks for things in python version < 3.7.2 that we do not support.
* [spelling] Ignore spelling in type/mypy type ignore comments (#8370)Pierre Sassoulas2023-03-021-19/+4
| | | | | | | enchant does not understand class name well enough so it creates false positives, and mypy type ignore comments with additional text are a syntax error anyway, so raising a spelling mistakes for it is not really important.
* Changing flake8 to have max-line-length of 115 (#8362)Ollie2023-03-0210-12/+27
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Refactor the `_check_protected_attribute_access` method to reduce ↵Mark Byrne2023-03-011-67/+69
| | | | indentation. (#8366)
* Support globbing pattern for input specification (#8312)Alexey Pelykh2023-03-011-2/+12
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [spelling checker] Better help message and code organization (#8338)Pierre Sassoulas2023-02-271-17/+35
| | | | Following a failed attempt to add functional tests for spelling checker in #6137
* Prevent emitting ``invalid-name`` on 'global' redefinition (#8337)Mark Byrne2023-02-271-5/+0
| | | | | Closes #8307
* Add ``invalid-name`` check for ``TypeAlias`` names (#7116)Daniël van Noord2023-02-265-22/+61
|
* Add new checker `bad-chained-comparison` (#7990)Zen Lee2023-02-261-0/+61
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add new check "implicit-flag-alias" (#8345)James Addison2023-02-261-8/+58
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fixing some too long lines (#8339)Ollie2023-02-2510-28/+51
| | | | | * Changing flake8 max-line-length to 120 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [doc] Add an example for 'non-ascii-file-name' (#8340)Pierre Sassoulas2023-02-251-13/+5
| | | | | And move links to related.rst Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Only count obviously non-terminating while-loops as return-ended (#8292)Nick Drozd2023-02-231-3/+6
|
* "Message emitted" improvements caused issuesStavros Ntentos2023-02-221-1/+1
| | | | | | | | | | Wrapping "Message emitted" in monospaced formatting, causes `W1507` (`pylint/checkers/stdlib.py`) to fail on a stray space. Fix that - as it seems to be the only outlier. (Might've been nice for a more formal check in the first place 🙏). Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
* Support globbing patterns for source-roots (#8281)Alexey Pelykh2023-02-214-15/+17
| | | Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
* Don't clear the FunctionalTestReporter.messages after each fileDaniel van Noord2023-02-201-3/+0
|
* Fix invalid type false positive (#8206)Nick Drozd2023-02-142-1/+15
|
* [typing] Use __future__ annotations where possible (#8264)Pierre Sassoulas2023-02-121-1/+1
|
* Fix FP for used-before-assignment with assignment expressions in containers ↵Jacob Walls2023-02-111-18/+19
| | | | (#8253)
* Add ``--version`` option to pyreverse (#8257)Andreas Finkler2023-02-101-0/+6
|
* Fix `used-before-assignment` false positive for walrus operator in ↵Zen Lee2023-02-101-0/+5
| | | | dictionary (#8176)