summaryrefslogtreecommitdiff
path: root/tests/functional/u
Commit message (Collapse)AuthorAgeFilesLines
* Regression fix for `unused-variable` false negative (#8684)Zen Lee2023-05-152-0/+18
|
* [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-023-0/+30
|
* Merge the compare-to-zero extensions to 'implicit_booleaness_checker'Pierre Sassoulas2023-05-023-0/+54
|
* Fix false negative for calling module-level function before definition (#8494)Jacob Walls2023-04-293-10/+23
|
* Drop support for Python 3.7 (#8609)Marc Mueller2023-04-242-10/+5
| | | | | * Drop support for Python 3.7 * Update py-version + classifier * Update functional tests
* Fix FP `used-before-assignment` for statements guarded under same test (#8581)Jacob Walls2023-04-162-1/+50
|
* 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 check unused arguments false positive bug (#8542)Théo Battrel2023-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
* Add regression test for #7506 (#8432)Jacob Walls2023-04-032-8/+11
|
* [cleanup] Upgrade more doc following the PyCQA migrationPierre Sassoulas2023-03-311-1/+1
|
* Fix `used-before-assignment` false positive for `TYPE_CHECKING` elif branch ↵Zen Lee2023-03-305-7/+22
| | | | | | imports (#8441) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [PyCQA migration] Upgrade links to the repositories in code and doc (#8514)Pierre Sassoulas2023-03-2945-95/+95
|
* Fix `unnecessary-lambda` false positive for lambdas using its parameters in ↵cherryblossom2023-03-282-0/+13
| | | | | | | their body (#8498) Fixes #8496
* [cleanup] Move tests starting with 'unbalanced' in a subdirPierre Sassoulas2023-03-235-0/+0
|
* Add regression test for #5288 (#8385)Jacob Walls2023-03-072-0/+13
|
* Fix FP for used-before-assignment with assignment expressions in containers ↵Jacob Walls2023-02-112-6/+9
| | | | (#8253)
* Fix `used-before-assignment` false positive for walrus operator in ↵Zen Lee2023-02-101-0/+13
| | | | dictionary (#8176)
* Fix `used-before-assignment` false positive for TYPE_CHECKING if/elif/else ↵Zen Lee2023-02-074-17/+121
| | | | usage (#8071)
* Update docs for `global-variable-not-assigned` (#8151)Dani Alcala2023-02-011-1/+1
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix false positive for `use-maxsplit-arg` with custom split (#8114)yushao22023-01-301-0/+8
| | | | | | Closes #4857 Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Update disallowed-name to flag module-level variables (#7808)Dani Alcala2023-01-253-9/+9
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix FP for `used-before-assignment` when reimporting name used in type ↵Jacob Walls2023-01-232-1/+4
| | | | | | annotation (#8095) Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Fix `used-before-assignment` false positive for walrus operators in ifs (#8029)Zen Lee2023-01-083-0/+46
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix `use-sequence-for-iteration` when unpacking a set with `*` (#7975)Dani Alcala2022-12-262-5/+16
|
* Fix `used-before-assignment` if conditional imports guarded again when used ↵Jacob Walls2022-12-252-5/+12
| | | | (#7980)
* [pypy3.8] Disable multiple-statements false positive on affected functional ↵Pierre Sassoulas2022-12-151-1/+8
| | | | tests
* Fix unreleased false positives with `used-before-assignment` (#7921)Jacob Walls2022-12-122-0/+14
| | | | | Cases with NamedExpr and Starred relating to definitions under "always false" conditions added in https://github.com/PyCQA/pylint/pull/6677
* Prevent `used-before-assignment` in pattern matching with a guard (#7922)Jacob Walls2022-12-122-0/+9
|
* Emit `used-before-assignment` for further imports guarded by TYPE_CHECKING ↵Jacob Walls2022-12-102-4/+16
| | | | | | | | (#7806) Previously, this message was only emitted for imports guarded directly under TYPE_CHECKING, not guarded two if-branches deep, nor when TYPE_CHECKING was imported from typing under an alias.
* Clearer ``reimported`` and new ``shadowed-import`` messages for aliased ↵Dani Alcala2022-11-302-2/+2
| | | | | | | import (#7756) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Prevent `used-before-assignment` for variables defined in assignment ↵Jacob Walls2022-11-252-4/+5
| | | | expressions (#7847)
* Fix crash when using ``enumerate`` with ``start`` and a class attribute (#7824)Dani Alcala2022-11-241-0/+11
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix `used-before-assignment` for variable annotations guarded by ↵Jacob Walls2022-11-232-4/+21
| | | | TYPE_CHECKING (#7810)
* Emit `used-before-assignment` for variables only defined under always false ↵Jacob Walls2022-11-226-3/+94
| | | | tests (#6677)
* New checker `unbalanced dict unpacking` (#7750)Dani Alcala2022-11-204-10/+118
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Better error message for unpacking-non-sequence and ↵Pierre Sassoulas2022-11-192-11/+11
| | | | | | | | unbalanced-tuple-unpacking (#7778) Necessary to be able to do https://github.com/PyCQA/pylint/pull/7750 without thinking about it. Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Fix `valid-metaclass-classmethod-first-arg` default value (#7791)Cubicpath2022-11-191-2/+2
| | | | | * Change default value to "mcs" * Fix functional tests to use "mcs" for first MetaClass classmethod arg
* Fix false positive for 'used-before-assignment' with terminating func (#7784)Dani Alcala2022-11-172-5/+18
|
* Fixes ``unnecessary-list-index-lookup`` false negative when ``enumerate`` is ↵Dani Alcala2022-11-172-0/+10
| | | | called with ``iterable`` as a kwarg. (#7789)
* Fix false positive for ``unhashable-member`` when subclassing ``dict``. (#7757)Mark Byrne2022-11-141-0/+6
| | | | | Closes #7501 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Detect unreachable code after sys.exit, quit, exit, and os._exit (#7520)Dani Alcala2022-11-132-6/+58
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* false positive `unnecessary-list-index-lookup` for enumerate (#7685)Dani Alcala2022-11-132-0/+53
| | | | | | | * do not report unnecessary list index lookup if start arg is passed * account for calling start with 0 or negative num Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix a false negative for ``unused-import`` (#7678)Mark Byrne2022-11-093-0/+13
| | | | | | | | | | | * Fix a false negative for ``unused-import`` when a constant inside ``typing.Annotated`` was treated as a reference to an import. * Update with Daniël's suggestions: - More understandable function parameter name. - Update function parameter type: Expect a tuple of strings. Closes #7547
* [use-implicit-booleaness-not-comparison] Better message with the type of ↵Pierre Sassoulas2022-11-091-32/+32
| | | | sequence
* Add R1737 use-dict-literal-without-kwargsRobert Hofer2022-11-098-22/+68
|
* [implicit_booleaness_checker] Add the confidence to related messages (#7721)Pierre Sassoulas2022-11-062-55/+55
| | | First step prior doing #6870 in order to make it more reviewable.
* Rename `broad-except` and new check `broad-exception-raised` (#7709)Dani Alcala2022-11-055-4/+5
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>