summaryrefslogtreecommitdiff
path: root/pylint/checkers
Commit message (Collapse)AuthorAgeFilesLines
* Add optional `prefer-typing-namedtuple` message (#8681)HEADmainJacob Walls2023-05-161-8/+14
| | | Closes #8660
* 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-151-1/+1
| | | | | | | | keyword-only arguments (#8674) Closes #8667
* Regression fix for `unused-variable` false negative (#8684)Zen Lee2023-05-151-0/+6
|
* 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-021-2/+56
|
* Merge the compare-to-zero extensions to 'implicit_booleaness_checker'Pierre Sassoulas2023-05-021-0/+59
|
* Fix false negative for calling module-level function before definition (#8494)Jacob Walls2023-04-291-9/+3
|
* Bump astroid to 3.0.0a1 (#8626)Marc Mueller2023-04-253-3/+9
|
* Drop support for Python 3.7 (#8609)Marc Mueller2023-04-2414-87/+15
| | | | | * Drop support for Python 3.7 * Update py-version + classifier * Update functional tests
* 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
* 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-141-0/+1
|
* 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>
* Don't use removed function from ``astroid`` (#8525)Daniël van Noord2023-04-011-5/+11
|
* [cleanup] Upgrade more doc following the PyCQA migrationPierre Sassoulas2023-03-312-2/+2
|
* Fix `used-before-assignment` false positive for `TYPE_CHECKING` elif branch ↵Zen Lee2023-03-302-157/+119
| | | | | | 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-2947-111/+112
|
* Allow integers in TypeAlias names (#8488)Stephane Odul2023-03-281-1/+3
|
* Fix `unnecessary-lambda` false positive for lambdas using its parameters in ↵cherryblossom2023-03-281-0/+8
| | | | | | | their body (#8498) Fixes #8496
* 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>
* [deprecation] Remove duplicated utils typing guards check (#8475)Pierre Sassoulas2023-03-221-43/+0
|
* Upgrade TODO for pylint 2.X to pylint 3.0 (#8480)Pierre Sassoulas2023-03-221-1/+1
| | | Closes #8335
* Fix incorrect preferred-modules matchesDaniël van Noord2023-03-211-1/+9
| | | | Co-authored-by: d33bs <dave.bunten@cuanschutz.edu>
* Add explicit 'stack_level' keyword in Deprecation/User warningsPierre Sassoulas2023-03-211-0/+2
|
* [ruff] Add RUF specific rules and autofix (#8449)Pierre Sassoulas2023-03-145-6/+6
|