summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve and flatten ``unused-wildcard-import`` message (#5110)Daniël van Noord2021-10-041-0/+4
| | | | | | | | | * Improve and flatten ``unused-wildcard-import`` message Instead of reporting all unused imports, the checker now emits one single message for all unused imports with a stylized string containing all imports. This closes #3859 * Add tests for string formation
* Add ``flynt`` to 2.11 changelogDaniël van Noord2021-09-171-1/+2
|
* Spelling and grammar fixesVille Skyttä2021-09-173-4/+4
|
* Move back to a dev version following 2.11.0 releasePierre Sassoulas2021-09-162-0/+26
|
* Bump pylint to 2.11.0, update changelogv2.11.0Pierre Sassoulas2021-09-162-3/+29
|
* Fix false positive ``unused-private-member`` for accessing attributes in a ↵yushao22021-09-141-0/+4
| | | | | | | | class using ``cls`` (#4965) * Fix false positive ``unused-private-member`` for accessing attributes in a class using ``cls`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Make consider-iterating-dictionary consider membership check (#4997)Daniël van Noord2021-09-141-0/+4
|
* Bump sphinx from 4.1.2 to 4.2.0dependabot[bot]2021-09-131-1/+1
| | | | | | | | | | | | | | | Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.1.2 to 4.2.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.1.2...v4.2.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* Documentation for ``pyreverse`` and ``symilar`` (#4992)Andreas Finkler2021-09-115-0/+110
| | | | | | | | | | | * Add documentation for ``pyreverse`` and ``symilar`` * Rephrase "additional tools" to "additional commands" to be consistent with Readme * Replace some example diagrams with PlantUML ones and fix errors preventing the doc to build * Incorporate review feedback * Only hint to the ``-h`` option instead of including all options manually in the docs
* Make ``global-variable-not-assigned`` check local scope (#4990)Daniël van Noord2021-09-111-0/+6
| | | | | | | | | | | | * Make ``global-variable-not-assigned`` check local scope This checker now checks whether the names after the global keyword are reassigned in the local scope. This closes #1375 * Make ``global-variable-not-assigned`` check functions This checker now also checks function defintions in the module and local scope This closes #330 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix bug with cache's parent directory not existing (#4988)Daniël van Noord2021-09-101-0/+4
| | | | | | By changing the function used to create the cache from ``os.mkdir`` to ``os.makedirs`` we now handle non-existing parent directories correctly. This closes #4900
* Make ``min-similarity-lines == 0`` stop similarity check (#4970)Daniël van Noord2021-09-071-0/+4
| | | | | | | | * Make ``min-similarity-lines == 0`` stop similarity check This makes it so that setting ``min-similarity-lines`` to zero exit the similarity code checker with a successful exit. This closes #4901 Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Fix typos in useless-suppression topicJacob Walls2021-09-061-2/+2
|
* Extend consider-using-in for attribute accessMarc Mueller2021-09-051-0/+2
|
* Refactor various typing related issues (#4940)Daniël van Noord2021-09-031-7/+9
| | | | | | | | | | | | | | | * Add type annotations to ``visit`` & ``leave`` calls This adds typing to most calls that visit nodes. All other changes are due to mypy errors resulting from introduction of typing. * Fix outstanding mypy issues This removes some of the `type: ignore` comments in favour of solving the mypy issues these comments were surpressing. * Fix remaining references to node_classes Except for two references to node_classes in the changelog this should be the last of them Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix false positive ``superfluous-parens`` for tuplesDaniël van Noord2021-09-011-0/+4
| | | | | | Tuples can be created with inner tuples. This creates double parenthesis which we flagged incorrectly. This closes #4907
* Extend ``unspecified-encoding`` checkerDaniël van Noord2021-09-011-0/+5
| | | | | | The ``unspecified-encoding`` checker now also checks calls to ``pathlib.Path().read_text()`` and ``pathlib.Path().write_text()`` This closes #4945
* Remove the python3 porting mode from the codebasePierre Sassoulas2021-09-012-3/+6
| | | | | | It's possible to use the python3 porting checker from an older pylint version. But it's not evolving anymore and was costing resource to maintain.
* Fix false positive `dict-iter-missing-items` for tuple keys (#4939)Daniël van Noord2021-08-311-0/+4
| | | | | | This fixes a false positive emitted for dictionaries that contain only tuples as keys. This makes unpacking the dictionary without calling `.items()` valid. This closes #3283
* Fix false positive ``protected-access`` in typing (#4937)Daniël van Noord2021-08-312-5/+8
| | | | | | | | * Fix false positive ``protected-access`` in typing Class functions can return protected members which can then be passed as arguments to other functions. When using type hints in function definitions these raised a message which they shouldn't do.
* Fix false positive for `function-redefined` for simple type annotationsDaniël van Noord2021-08-311-0/+4
| | | | Closes #4936
* Fix faq.rst:138:undefined label: message-controlPierre Sassoulas2021-08-311-0/+2
|
* Emit a correct invalid-name message when using multi-naming style. (#4924)Yilei "Dolee" Yang2021-08-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Emit a correct invalid-name message when using multi-naming style. Previously, given `--function-rgx=(?:(?P<UP>[A-Z]+)|(?P<down>[a-z]+))$` and the code: ``` def FOO(): pass def UPPER(): pass def lower(): pass ``` It would emit a message: ``Function name `lower` doesn't conform to '(?:(?P<UP>[A-Z]+)|(?P<down>[a-z]+))$' pattern [invalid-name]``. The message is misleading as `lower` *does* conform to `(?:(?P<UP>[A-Z]+)|(?P<down>[a-z]+))$`. It's just not the prevalent group "UP". After this commit, the message becomes: ``Function name `lower` doesn't conform to UP group in the '(?:(?P<UP>[A-Z]+)|(?P<down>[a-z]+))$' pattern [invalid-name]`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add `use-set-for-membership` check (#4841)Marc Mueller2021-08-301-0/+7
| | | | | | | | | * Add use-set-for-membership check * Create SetMembershipChecker extension * Add heuristic to check items for hashability Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Bump python-docs-theme from 2021.5 to 2021.8 (#4931)dependabot[bot]2021-08-301-1/+1
| | | | | | | | | | | | | | | | | Bumps [python-docs-theme](https://github.com/python/python-docs-theme) from 2021.5 to 2021.8. - [Release notes](https://github.com/python/python-docs-theme/releases) - [Changelog](https://github.com/python/python-docs-theme/blob/master/CHANGELOG.rst) - [Commits](https://github.com/python/python-docs-theme/compare/2021.5...2021.8) --- updated-dependencies: - dependency-name: python-docs-theme dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add `consider-using-assignment-expr` to `CodeStyleChecker` (#4876)Marc Mueller2021-08-301-0/+10
| | | | | | | | | | | * Add global py-version config * Add typing-extensions as requirement for Python < 3.10 * Add consider-using-assignment-expr to CodeStyleChecker * Default to max-line-length Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Implement basic control flow checks for ``consider-using-with`` (#4929)Andreas Finkler2021-08-301-0/+3
| | | | | | | * Add some control flow checks to consider-using-with in order to handle assignments in different branches * Use existing function from ``astroid`` to determine whether two statements are exclusive * Add unit tests for new utility methods * Add ChangeLog and whatsnew entry
* Add ``Consider-using-f-string`` checker (#4796)Daniël van Noord2021-08-302-1/+5
| | | | | | | | | | | | | | | | * Add ``consider-using-f-string`` checker This adds a checker for normal strings which are formatted with ``.format()`` or '%'. The message is a convention to nudge users towards using f-strings. This closes #3592 * Update pylint code to use f-strings After adding `consider-using-f-strings` the codebase showed numerous cases of formatting which could be f-strings. This commit changes most of these to become f-strings, or adds ignores. * Apply suggestions from code review Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Move back to a dev version following 2.10.0 releasePierre Sassoulas2021-08-202-0/+22
|
* Bump pylint to 2.10.0, update changelogv2.10.0Pierre Sassoulas2021-08-202-17/+33
|
* Add consider-ternary-expression extensionNick Drozd2021-08-201-1/+5
|
* Add extension check against use of while loops (#4860)Nick Drozd2021-08-181-0/+4
| | | | | * Move stray functional tests * Clean up some while loops * Add extension check against use of while loops
* [duplicate-code] Parse functions and class methods recursively when ↵Maksym Humetskyi2021-08-171-0/+4
| | | | | gathering signature lines (#4858) * [duplicate-code] Parse functions and class methods recursively when gathering signature lines
* Suppress ``consider-using-with`` on return statementsDudeNr332021-08-151-0/+2
|
* ``pyreverse``: Add option for colored output (#4850)Andreas Finkler2021-08-151-0/+2
| | | | | | | * Add option to produce colored output from ``pyreverse`` * Use indentation in PlantUML diagrams Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* ``pyreverse``: add PlantUML output (#4846)Andreas Finkler2021-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | * Extract helper method to get annotated arguments into ``Printer`` base class. * Add ``Printer`` subclass for PlantUML output * Add functional test for ``PlantUmlPrinter`` * Add tests for specific layout for ``PlantUmlPrinter`` * Extract test helper function to remove code duplication * Add new test class to check type annotations * Cleanup generated .puml files after tests finished * Create a factory function to get the correct ``Printer`` class for a given filetype. * Fix unittest after adding a new class to the test data. * Add changelog and whatsnew entry * Add "plantuml" as possible extension for PlantUML output
* Improvements consider-using-tuple (#4838)Marc Mueller2021-08-131-0/+10
| | | | | | * Fix typing * Improve consider-using-tuple check * Limit to in-place defined lists * Emit even for starred expressions
* Add new check - use-sequence-for-iterationMarc Mueller2021-08-131-0/+2
|
* Permit to lint to the end in case of crash on a file (#4810)Pierre Sassoulas2021-08-122-1/+6
| | | | | | | | | * Permit to lint to the end in case of crash on a file And add pre-filled issue template so it's easier to open an issue in pylinthome * Print full traceback when a crash occur See discussion here: https://github.com/PyCQA/pylint/pull/4810\#issuecomment-897735720
* Revert "Extended consider-using-tuple check to cover 'in' comparisons (#4768)"Marc Mueller2021-08-121-8/+0
| | | | This reverts commit ca3bc53fd8d628473fba25c7736d0abfac8e4a4a.
* Fix bugs in W0640 cell-var-from-loop checker (#4827)David Liu2021-08-121-0/+9
| | | | | | | | | | | | | | * Fix bugs in W0640 cell-var-from-loop checker. 1. Handle cell var appearing in node inside function. 2. Handle cell var appearing in non-trivial default argument expression. 3. Use astroid's lookup method to account for variable shadowing. * Fix cell-var-from-loop dependency on other checks. Previously, this check would have many false negatives when both unused-variable and used-before-assignment were disabled. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix the link to the discord server in the doc (#4830)Pierre Sassoulas2021-08-111-1/+2
|
* Add ``redundant-u-string-prefix`` checker (#4804)Daniël van Noord2021-08-061-1/+5
| | | | | | * Add ``redundant-u-string-prefix`` checker This adds a checker for u-prefixes for strings, as used in Python 2. It only work in python 3.8 and above. Closes #4102
* Add ``disable-next`` option (#4797)Daniël van Noord2021-08-053-4/+31
| | | | | | | | | | * Add ``disable-next`` option Adding `# pylint: disable-next=msgid` to your file will disable the message for the next line. This closes #1682 * Add documentation, rorganize the FAQ for disable/enable and add ref to the full doc Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Documentation for what blocks are and FAQ clean up (#4800)Pierre Sassoulas2021-08-041-24/+25
| | | Closes #2452
* Add ``format-string-without-interpolation`` checker (#4794)Daniël van Noord2021-08-041-0/+4
| | | | | | | | | * Add ``format-string-without-interpolation`` checker This adds a checker that checks strings with '%' or format() applied to them. If no variables to be replaced are found the warning is emitted. Closes #4042 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Upgrade astroid to 2.6.6Pierre Sassoulas2021-08-041-1/+1
|
* Refactor ``--list-msgs`` & ``--list-msgs-enabled`` (#4793)Daniël van Noord2021-08-031-0/+4
| | | | | | | | * Refactor ``--list-msgs`` & ``--list-msgs-enabled`` Both options now show which messages can't be emitted with the current interpreter. This makes function more like their name implies. This closes #4778 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix false negative for used-before-assignment (ExceptHandler) (#4791)David Liu2021-08-031-0/+5
| | | | | | | * Fix false negative for used-before-assignment (ExceptHandler) Closes #626. * Fix unused-variable check for exception variables
* Fix false positives for ``superfluous-parens`` (#4784)Daniël van Noord2021-08-031-0/+7
| | | | | | | | | | | | | | * Split functional tests for ``superfluous-parents`` * Fix false positives for superfluous-parens This fixes the false positives identified in #2818, #3249, #3608 & #4346 All false positives reported fell under keywords before walrus operator or if-keyword within generators/comprehension. This closes #2818, closes #3429, closes #3608, closes #4346 * Move the superfluous functional tests to functional/s/super Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>