summaryrefslogtreecommitdiff
path: root/pylint/checkers/refactoring
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Fixed misinterpreted modulo sign for ``consider-using-f-string`` (#6914)Paul Lichtenberger2022-06-111-0/+6
| | | | | | * Fixed a false positive in consider-using-f-string if the left side of a % is not a string. * consider-using-f-string: if left side of a \% does not have the attr value it can't be a str
* 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-232-6/+6
|
* Some initial line wrapping of docstrings (#6672)Daniël van Noord2022-05-232-2/+5
|
* 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
|
* Run development version of ``pydocstringformatter`` (#6469)Daniël van Noord2022-04-282-2/+2
|
* 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-224-24/+28
|
* Remove references to to-be-deprecated interfacesDaniël van Noord2022-04-201-3/+1
|
* Remove ``IAstroidChecker`` from ``__implements__``Daniël van Noord2022-04-193-7/+3
|
* 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>
* Add ``--minimal-messages-config`` option for functional tests (#6246)Andreas Finkler2022-04-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ``--minimal-messages-config`` option for functional tests * Add test file option to exclude from --minimal-messages-config run. * Fix ``too-many-branches`` false negative * Fix ``access-member-before-definition`` false negative * Fix ``consider-using-min-builtin`` and ``consider-using-max-builtin`` false negatives * Fix ``consider-using-with`` false negative * Exclude ``deprecated-module`` tests from ``--minimal-messages-config`` run. Have to find out how the list of deprecated modules is built first. * Update doc/whatsnew/2.14.rst * Ignore deprecated module false negatives * Fix ``deprecated-typing-alias`` false negative * Skip tests for ``fixme`` message, don't know yet how enable/disable affects TokenChecker/RawChecker * Exclude functional test for various logging checks, as the output string depends on what messages are enabled. * Fix false negative for ``nan-comparison`` * Fix false negative for ``non-ascii-module-import`` * Fix false negative for ``non-ascii-file-name`` * Skip tests for logging messages * Fix false negative for ``undefined-variable`` in ``metaclass`` argument * Exclude test for ``catching-non-exception``. ``exc._all_bases_known`` is ``False`` when enabling just this message. * Exclude ``ungrouped_imports_suppression``. ``useless-suppression`` is triggered too often in this case. * Fix false negative for ``use-a-generator`` * Exclude functional tests for ``useless-suppression`` from ``--minimal-messages-config`` * Exclude another deprecation check from ``--minimal-messages-config`` run * Update tests/testutils/data/m/minimal_messages_config.py Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Deprecate ``get_global_option``Daniël van Noord2022-04-152-4/+2
|
* Use ``--py39-plus`` and ``--full-reorder`` in ``python-typing-update`` (#6313)Daniël van Noord2022-04-141-1/+2
|
* Replace .namespace with .config (#6316)Daniël van Noord2022-04-141-3/+3
|
* Use ``python-typing-update`` on ``pylint/checkers/...`` directoriesDaniël van Noord2022-04-144-18/+19
|
* Remove the ``future_option_parsing`` keyword (#6253)Daniël van Noord2022-04-111-1/+1
|
* Use ``argparse`` config handler on three checkersDaniël van Noord2022-04-051-5/+8
|
* [refactor] Use for v in *.values() instead of _, v in *.items()Pierre Sassoulas2022-04-021-1/+1
|
* Remove the concept of checker priority (#6034)Daniël van Noord2022-04-012-3/+0
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix crash in ``unnecessary-list-index-lookup`` checker (#6049)Tim Martin2022-03-311-0/+5
|
* New checker `unnecessary-list-index-lookup` (#4525) (#5834)Tim Martin2022-03-251-1/+85
|
* Add a pre-commit hook to check the copyright noticePierre Sassoulas2022-03-245-6/+7
| | | | | Fix the existing file so they have a notice. No header for setup.py or examples or doc
* Simplify hard to maintain copyright noticePierre Sassoulas2022-03-245-34/+5
| | | | | | git is the source of truth for the copyright, copyrite (the tool) was taking exponentially longer with each release, and it's polluting the code with sometime as much as 50 lines of names.
* Simplify ``cached_property`` import guards (#5915)Daniël van Noord2022-03-141-13/+2
|
* Upgrade ``pydocstringformatter`` to ``0.5.0`` (#5910)Daniël van Noord2022-03-132-4/+6
|
* Use ``functools.cached_property`` on 3.8+ (#5907)Daniël van Noord2022-03-121-2/+19
|
* Use value directly instead of index in ``enumerate`` contexts (#5856)Tim Martin2022-03-021-4/+4
| | | | Refactoring to prevent warnings being issued on these lines from a new proposed checker.
* Update ``pydocstringformatter`` to 0.4.0 (#5787)Daniël van Noord2022-02-103-15/+15
|
* Fix crash in `use-maxsplit-arg` checker where `sep` given by keyword (#5772)Jacob Walls2022-02-061-2/+2
|
* Clearer error message for useless-else-x type messages (#5736)Pierre Sassoulas2022-01-301-8/+9
| | | | | | | | | | * Clearer error message for useless-else-x type message See https://github.com/PyCQA/pylint/pull/5614#issuecomment-1023614434 for rationale. Closes #5598 Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Create separate documentation page for each message (#5396)Daniël van Noord2022-01-281-2/+2
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix crash on properties & inherited methods in ``implicit-booleaness`` (#5652)Daniël van Noord2022-01-131-10/+14
|
* Add ``future=True`` to all ``NodeNG.frame`` calls (#5621)Daniël van Noord2022-01-102-8/+10
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Format docstrings with ``pydocstringformatter``Daniël van Noord2022-01-023-16/+18
|
* Fix false positive `consider-using-dict-comprehension` when creating a dict ↵Tushar Sadhwani2021-12-301-3/+22
| | | | | | using a list of tuple where key AND value vary depending on the same condition (#5590) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Fix reported node for `unnecessary-comprehension` (#5601)Tushar Sadhwani2021-12-281-2/+4
|
* Add typing and uniformize the checker registering in Pylinter (#5558)Pierre Sassoulas2021-12-271-2/+6
| | | | | Remove verbose docstring in code, keep them in example and doc Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Fix typos accross the whole codebase (#5575)Pierre Sassoulas2021-12-211-1/+1
| | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>