summaryrefslogtreecommitdiff
path: root/pylint/checkers/refactoring/refactoring_checker.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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-291-5/+5
|
* Bump pylint to 2.17.0, update changelog (#8395)Pierre Sassoulas2023-03-071-1/+1
|
* Use UninferableBase instead of UninferableDaniel van Noord2023-03-071-4/+10
|
* 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
* 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-271-2/+0
|
* ``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>
* Add R1737 use-dict-literal-without-kwargsRobert Hofer2022-11-091-8/+40
|
* 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
* 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`.
* 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-091-4/+8
|
* 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 whitespaces in some message descriptions (#7001)Julthep Nandakwang2022-06-221-3/+3
|
* [consider-using-in] Add 'sets' in the message description (#6966)Julthep Nandakwang2022-06-171-3/+3
|
* [refactor] Normalize the typing of visitor functions (#6892)Pierre Sassoulas2022-06-121-1/+1
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Suppress ``unnecessary-list-index-lookup`` for whole loop on write (#6845)Tim Martin2022-06-111-18/+92
| | | | | | | | | | The ``unnecessary-list-index-lookup`` checker was assuming that if the subscript was written to then it would only invalidate access on later lines, but this is not necessarily the case if an inner loop is nested inside the one being checked. Fixes #6818 Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Prevent warnings on dict / list index lookup with destructuring assignment ↵Tim Martin2022-06-041-10/+24
| | | | | | (#6808) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* [simplifiable-if-expression] Add reference to implicit cast to bool in ↵Pierre Sassoulas2022-05-291-1/+2
| | | | description
* Enable line-wrapping from ``pydocstringformatter``Daniël van Noord2022-05-231-4/+4
|
* Update ``pydocstringformatter`` to ``0.6.0`` (#6671)Daniël van Noord2022-05-231-2/+0
|
* Fix a crash in `unnecessary-list-index-lookup` when incorrectly using ↵Jacob Walls2022-05-131-0/+1
| | | | `enumerate()` (#6604)
* Change wording of use a generator message for sum/max/min (#6600)Pierre Sassoulas2022-05-131-5/+6
| | | | | Follow-up to #6595 Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Raise use_a_generator for `sum()`, `max()`, `min()` (#6595)Matus Valo2022-05-131-5/+7
| | | | | | | | | | | | | * Raise use_a_generator for `sum()`, `max()`, `min()` * Updated changelog * and -> or * Update ChangeLog 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>
* Fix a crash in `unnecessary-dict-index-lookup` when subscripting an ↵Jacob Walls2022-05-111-0/+1
| | | | attribute (#6579)
* Fix typo in RefactoringChecker._check_simplifiable_condition()Jacob Walls2022-04-291-1/+1
|
* Remove some words from custom dictionary and update spellingDaniël van Noord2022-04-261-1/+1
|
* Migrate from utils.check_messages to utils.only_required_for_messages (#6432)Pierre Sassoulas2022-04-221-16/+18
|
* Remove references to to-be-deprecated interfacesDaniël van Noord2022-04-201-3/+1
|
* Subclass ``BaseRawFileChecker`` and ``BaseTokenChecker``Daniël van Noord2022-04-191-1/+1
|
* Add typing to BaseChecker.process_token (#6273)Pierre Sassoulas2022-04-191-1/+1
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>