summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add optional `prefer-typing-namedtuple` message (#8681)HEADmainJacob Walls2023-05-163-0/+14
| | | Closes #8660
* Add new checker `kwarg-superseded-by-positional-arg` and fix a false ↵Mark Byrne2023-05-168-20/+87
| | | | | | | | | | 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-153-1/+7
| | | | | | | | keyword-only arguments (#8674) Closes #8667
* Regression fix for `unused-variable` false negative (#8684)Zen Lee2023-05-152-0/+18
|
* Load custom plugins when linting in parallel (#8683)Jacob Walls2023-05-141-1/+16
|
* Fix crash when deleting from a dict returned from a call (#8678)Jacob Walls2023-05-122-0/+8
|
* Primer - remove `.git` suffix from github URL. (#8676)Mark Byrne2023-05-111-1/+1
|
* Merge maintenance-2.17.x in main following 2.17.4 releasePierre Sassoulas2023-05-062-0/+84
|\
| * Added escaping of vertical bar character in annotation labels (#8610) (#8631)Andreas Finkler2023-04-2717-24/+68
| |
| * Fix a false positive for ``bad-dunder-name`` when there is a user-defined ↵github-actions[bot]2023-04-241-0/+3
| | | | | | | | | | | | | | | | | | ``__index__`` method. (#8619) (#8622) Closes #8613 (cherry picked from commit f223c6de3a39eae6d1c76e30b55da28639dd8777) Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
| * Disable import-error as attrs is no longer a test dependencyMarc Mueller2023-04-231-1/+1
| |
| * Improve output of `consider-using-generator` message for `min()` calls with ↵github-actions[bot]2023-04-172-0/+6
| | | | | | | | | | | | | | `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-153-0/+18
| | | | | | | | | | | | | | | | | | * 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-122-1/+6
| | | | | | | | | | | | | | | | 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/+18
| | | | | | | | | | | | | | 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-072-4/+8
| | | | | | | | (cherry picked from commit b5f2b01635edd23fecc1546f3fdb2a41e6a51995)
| * Fix typelias `invalid-name` false positives for Union variables without ↵github-actions[bot]2023-04-072-3/+6
| | | | | | | | | | | | | | 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-072-7/+12
| | | | | | | | (cherry picked from commit eeddd667a6e73ef58fb47cdda154c1751f0ffe71)
| * Fix check unused arguments false positive bug (#8542) (#8545)github-actions[bot]2023-04-062-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [Backport maintenance/2.17.x] Add regression test for #7506 (#8531)github-actions[bot]2023-04-032-8/+11
| | | | | | | | | | | | | | | | | | | | * Add regression test for #7506 (#8432) (cherry picked from commit 1fa16c2d8a7e97223541069731d28896f651b1ab) --------- Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
| * [pyreverse] Bugfix: strip "/" at the end of the file (#8517) (#8528)github-actions[bot]2023-04-021-0/+17
| | | | | | | | | | | | | | 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>
| * [Backport maintenance/2.17.x] Allow integers in TypeAlias names. (#8507)github-actions[bot]2023-03-282-10/+14
| | | | | | | | 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-282-0/+13
| | | | | | | | | | | | | | | | | | 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-0/+4
| | | | | | | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 07127ee75f3456920ff5117cdbaf8697744b6cfc)
| * Fix incorrect preferred-modules matches (#8481)github-actions[bot]2023-03-221-0/+17
| | | | | | | | | | | | 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-121-0/+1
| | | | | | | | | | (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-112-0/+14
| | | | | | | | | | (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-0/+10
| | | | | | | | | | (cherry picked from commit 4c56ba82d7aac50b1ea34e929833c91418e1d117) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* | [use-implicit-booleaness] Reinstate tests that are expected to failPierre Sassoulas2023-05-031-10/+10
| |
* | Add applicability notes for `compare-to-empty-string/zero` (#8592)Jason Lau2023-05-033-44/+44
| | | | | | | | | | | | 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-32/+32
| | | | | | | | | | Because empty string needs to " because node.as_string() use simple quote.
* | Merge the empty-string extensions to 'implicit_booleaness_checker'Pierre Sassoulas2023-05-026-30/+30
| |
* | Merge the compare-to-zero extensions to 'implicit_booleaness_checker'Pierre Sassoulas2023-05-026-54/+54
| |
* | Search for pyproject.toml config file in parent dirs (#7163)Mikhail f. Shiryaev2023-04-301-0/+41
| | | | | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* | Fix false negative for calling module-level function before definition (#8494)Jacob Walls2023-04-293-10/+23
| |
* | Add home-assistant to primer and remove old external primer (#8612)Jacob Walls2023-04-294-95/+5
| |
* | Added escaping of vertical bar character in annotation labels (#8610)ViRuSTriNiTy2023-04-2616-11/+44
| |
* | Bump astroid to 3.0.0a1 (#8626)Marc Mueller2023-04-251-1/+8
| |
* | Drop support for Python 3.7 (#8609)Marc Mueller2023-04-2412-39/+15
| | | | | | | | | | * 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/+3
| | | | | | | | | | ``__index__`` method. (#8619) Closes #8613
* | Update pytest requirement from ~=7.2 to ~=7.3 (#8562)dependabot[bot]2023-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update pytest requirement from ~=7.2 to ~=7.3 Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.2.0...7.3.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production ... * Disable import-error as attrs is no longer a test dependency --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* | Modified all occurences of "a f-string" to "an f-string"Elazrod562023-04-203-32/+32
| |
* | Modified comment on line 147 to improve spellingElazrod562023-04-201-1/+1
| |
* | Fix FP `used-before-assignment` for statements guarded under same test (#8581)Jacob Walls2023-04-162-1/+50
| |
* | Improve output of `consider-using-generator` message for `min()` calls with ↵Jacob Walls2023-04-162-0/+6
| | | | | | | | `default` keyword (#8582)
* | Cope with changes to `Arguments` constructorJacob Walls2023-04-161-1/+1
| |
* | Cope with changes to `AssignAttr` constructorJacob Walls2023-04-161-1/+8
| |
* | Fix `used-before-assignment` TYPE_CHECKING false negatives (#8431)Zen Lee2023-04-152-0/+20
| | | | | | | | 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-143-0/+18
| | | | | | | | **kwargs (#8575)
* | Fix false positive for ``keyword-arg-before-vararg`` (#8571)Mark Byrne2023-04-133-0/+18
| | | | | | | | | | * Fix false positive for ``keyword-arg-before-vararg`` when a positional-only parameter with a default value precedes ``*args``. Closes #8570