summaryrefslogtreecommitdiff
path: root/pylint/checkers/refactoring
Commit message (Collapse)AuthorAgeFilesLines
* [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
|
* Drop support for Python 3.7 (#8609)Marc Mueller2023-04-241-6/+1
| | | | | * Drop support for Python 3.7 * Update py-version + classifier * Update functional tests
* Optimize `is_trailing_comma()` (#8606)Jacob Walls2023-04-231-4/+5
| | | Skip is_trailing_comma() call unless `trailing-comma-tuple` enabled
* Modified all occurences of "a f-string" to "an f-string"Elazrod562023-04-201-2/+2
|
* Improve output of `consider-using-generator` message for `min()` calls with ↵Jacob Walls2023-04-161-1/+5
| | | | `default` keyword (#8582)
* [PyCQA migration] Upgrade links to the repositories in code and doc (#8514)Pierre Sassoulas2023-03-295-13/+13
|
* Bump pylint to 2.17.0, update changelog (#8395)Pierre Sassoulas2023-03-071-1/+1
|
* Use UninferableBase instead of UninferableDaniel van Noord2023-03-072-6/+14
|
* Fixing some too long lines (#8339)Ollie2023-02-251-10/+16
| | | | | * Changing flake8 max-line-length to 120 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Only count obviously non-terminating while-loops as return-ended (#8292)Nick Drozd2023-02-231-3/+6
|
* Fix crash when an attribute node was used inside an unary op (#8209)Pierre Sassoulas2023-02-071-2/+5
| | | | | Closes #8207
* Fix false positive for `use-maxsplit-arg` with custom split (#8114)yushao22023-01-301-0/+5
| | | | | | Closes #4857 Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Tighten design constraints (#8115)Nick Drozd2023-01-281-0/+1
| | | | | | | | | | | | | * Lower max locals * Lower max statements * Lower max try statements * Lower max branches * Lower max args * Cut design constraints with default values
* Fixed a crash when inferring a value and using its qname on a slice (#8070)Pierre Sassoulas2023-01-181-2/+4
| | | | Closes #8067
* [consider-using-sys-exit] Better rationale and added confidencePierre Sassoulas2022-12-281-3/+4
|
* [pre-commit] Upgrade to black 23.1a1 with 2023's formatting (#7965)Pierre Sassoulas2022-12-272-3/+0
|
* Fix `use-sequence-for-iteration` when unpacking a set with `*` (#7975)Dani Alcala2022-12-261-4/+11
|
* ``consider-using-with`` now triggers for ``pathlib.Path.open`` (#7968)Gideon2022-12-211-0/+1
|
* Fix ``no-else-return false Negative for try/except/else pattern (#7888)Dani Alcala2022-12-121-7/+36
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix crash when using ``enumerate`` with ``start`` and a class attribute (#7824)Dani Alcala2022-11-241-9/+7
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Do not crash if next() is called without arguments (#7831)Dani Alcala2022-11-241-0/+5
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fixes ``unnecessary-list-index-lookup`` false negative when ``enumerate`` is ↵Dani Alcala2022-11-171-3/+11
| | | | called with ``iterable`` as a kwarg. (#7789)
* Suppress `stop-iteration-return` on `itertools.cycle` (#7766)Tushar Sadhwani2022-11-141-1/+1
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Extend `consider-using-join` to detect non-empty separators (#7481)Levi Gruspe2022-11-131-3/+17
|
* false positive `unnecessary-list-index-lookup` for enumerate (#7685)Dani Alcala2022-11-131-3/+57
| | | | | | | * 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>
* Do not report `consider_iterating_dictionary` if bitwise operations are used ↵Dani Alcala2022-11-101-1/+8
| | | | | | | (#7743) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [use-implicit-booleaness-not-comparison] Better message with the type of ↵Pierre Sassoulas2022-11-091-9/+17
| | | | sequence
* Add R1737 use-dict-literal-without-kwargsRobert Hofer2022-11-091-8/+40
|
* [implicit_booleaness_checker] Add the confidence to related messages (#7721)Pierre Sassoulas2022-11-061-26/+35
| | | First step prior doing #6870 in order to make it more reviewable.
* Fix astroid error for custom ``next`` method (#7622)Dani Alcala2022-11-031-3/+9
| | | | | * short-circuit if next method doesnt have args * check for builtins.next qname * add inference confidence level
* Move `consider-using-augmented-assign` to `CodeStyle` extension (#7628)Marc Mueller2022-10-161-20/+0
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix a false positive for `simplify-boolean-expression` when multiple values ↵Jacob Walls2022-10-161-6/+5
| | | | | inferred (#7627) Add a keyword-only `compare_constants` argument to `safe_infer`.
* Add ``consider-using-augmented-assign`` checker (#7514)Daniël van Noord2022-09-221-0/+20
| | | | Co-authored-by: clavedeluna <danalitovsky+git@gmail.com> Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Turn on ``mypy`` strict mode 🎉 (#7448)Daniël van Noord2022-09-091-6/+6
| | | | | | | | | | * Ignore subclasses of Any * Add ignores for imported code and remove casts * Add disables for uninferable return values * Turn on ``mypy`` strict mode
* Finish typing across the codebaseDaniël van Noord2022-09-092-5/+9
|
* Skip ``unnecessary-list-index-lookup`` if we encounter if statements (#7334)Daniël van Noord2022-08-221-0/+11
|
* Partial typing of ``refactoring_checker`` (#7315)Daniël van Noord2022-08-161-25/+33
|
* Partial typing of ``refactoring_checker`` (#7312)Daniël van Noord2022-08-161-21/+35
|
* Partial typing of ``refactoring_checker``Daniël van Noord2022-08-111-22/+31
|
* [consider-using-in] Add the proper confidence to the messagePierre Sassoulas2022-07-041-0/+1
|
* [consider-using-in] Suggest set instead of tuple for membershipPierre Sassoulas2022-07-041-5/+8
|
* Add missing whitespace to a message description (#7002)Julthep Nandakwang2022-06-231-1/+1
|