summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Add regression test for #5288 (#8385)Jacob Walls2023-03-072-0/+13
|
* Accept values of the form ``<class name>.<attribute name>`` for the ↵Mark Byrne2023-03-033-5/+16
| | | | | | | | `exclude-protected` list (#8364) Closes #7343 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [spelling] Ignore spelling in type/mypy type ignore comments (#8370)Pierre Sassoulas2023-03-021-18/+21
| | | | | | | 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-021-1/+2
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Support globbing pattern for input specification (#8312)Alexey Pelykh2023-03-012-2/+20
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [spelling checker] Better help message and code organization (#8338)Pierre Sassoulas2023-02-271-0/+15
| | | | Following a failed attempt to add functional tests for spelling checker in #6137
* Prevent emitting ``invalid-name`` on 'global' redefinition (#8337)Mark Byrne2023-02-274-2/+11
| | | | | Closes #8307
* [test] Use an empty pylintrc so tests to not depend on system's conf (#8350)Pierre Sassoulas2023-02-264-5/+14
| | | | | | | | | | | | | * [test] Use an empty pylintrc so tests to not depend on system's conf Closes #8342 * Update tests/checkers/unittest_imports.py Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> --------- Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Add ``invalid-name`` check for ``TypeAlias`` names (#7116)Daniël van Noord2023-02-2616-14/+79
|
* Add new checker `bad-chained-comparison` (#7990)Zen Lee2023-02-264-2/+64
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [test] Permits to debug more easily 'test_allow_reexport_package' (#8347)Pierre Sassoulas2023-02-261-1/+1
| | | Refs #8342
* Add new check "implicit-flag-alias" (#8345)James Addison2023-02-262-0/+54
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fixing some too long lines (#8339)Ollie2023-02-255-18/+23
| | | | | * 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-1/+1
| | | | | 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-232-1/+52
|
* "Message emitted" improvements caused issuesStavros Ntentos2023-02-221-2/+2
| | | | | | | | | | 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-211-0/+14
| | | Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
* Fix test for ``plugin_does_not_exists``Daniel van Noord2023-02-202-1/+2
|
* Remove broken rcfile from ``empty_docstring`` testDaniel van Noord2023-02-201-3/+0
|
* [doc] Add an example for 'too-many-locals' (#8306)Pierre Sassoulas2023-02-171-4/+4
|
* Fix invalid type false positive (#8206)Nick Drozd2023-02-147-8/+40
|
* Add regression test for #8109Pierre Sassoulas2023-02-132-0/+16
|
* Fix FP for used-before-assignment with assignment expressions in containers ↵Jacob Walls2023-02-112-6/+9
| | | | (#8253)
* Add ``--version`` option to pyreverse (#8257)Andreas Finkler2023-02-101-0/+13
|
* Fix `used-before-assignment` false positive for walrus operator in ↵Zen Lee2023-02-101-0/+13
| | | | dictionary (#8176)
* Add `--color-palette` option to `pyreverse` (#8223)Andreas Finkler2023-02-093-0/+55
|
* Support Implicit Namespace Packages (PEP 420) (#8153)Alexey Pelykh2023-02-0916-22/+147
| | | Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
* Fix `nested-min-max` output msg for sequences (#8234)Dani Alcala2023-02-082-0/+29
|
* Add import-based submodule detection for preferred-modules (#8186)Dave Bunten2023-02-082-1/+58
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix `used-before-assignment` false positive for TYPE_CHECKING if/elif/else ↵Zen Lee2023-02-074-17/+121
| | | | usage (#8071)
* Fix no-name-in-module when variable is same as module name (#8169)Dani Alcala2023-02-075-0/+18
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix crash when an attribute node was used inside an unary op (#8209)Pierre Sassoulas2023-02-071-0/+14
| | | | | Closes #8207