| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
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>
|
|
|
|
|
|
| |
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
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
Tuples can be created with inner tuples. This creates double parenthesis
which we flagged incorrectly.
This closes #4907
|
|
|
|
|
|
| |
The ``unspecified-encoding`` checker now also checks calls to ``pathlib.Path().read_text()``
and ``pathlib.Path().write_text()``
This closes #4945
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
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.
|
|
|
|
| |
Closes #4936
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* Create SetMembershipChecker extension
* Add heuristic to check items for hashability
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
| |
* 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
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 stray functional tests
* Clean up some while loops
* Add extension check against use of while loops
|
|
|
|
|
| |
gathering signature lines (#4858)
* [duplicate-code] Parse functions and class methods recursively when gathering signature lines
|
| |
|
|
|
|
|
|
|
| |
* Add option to produce colored output from ``pyreverse``
* Use indentation in PlantUML diagrams
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
* Fix typing
* Improve consider-using-tuple check
* Limit to in-place defined lists
* Emit even for starred expressions
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
This reverts commit ca3bc53fd8d628473fba25c7736d0abfac8e4a4a.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
| |
* 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
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>
|
|
|
| |
Closes #2452
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
| |
* 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)
Closes #626.
* Fix unused-variable check for exception variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|