| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
* Change tests for ``filepath`` changes
* Add pylint/typing.py and FileItem NamedTuple
* Use NamedTuple more efficiently
* Fix errors and tests after adding warning
* Add deprecation for future API change in Checker
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add typing and fix small issue in pylint.reporters
Fix typing error in pylint/checkers/imports.py. Add typing
of report related code outside of pylint.reporters.
* Remove unused argument in pylint.reporters.VNode constructor
* Simplify and specify the typing in reporters nodes
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
|
|
|
|
|
| |
* Move methods to `BaseLayout` and change typing, see https://github.com/PyCQA/pylint/pull/5004#discussion_r708532947
|
|
|
| |
See : https://github.com/PyCQA/pylint/pull/5010#issuecomment-920291278
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add typing to all calls to ``self.stats``
All checkers inherit from a baseclass which has a ``stats`` attribute.
This attribute has a fairly unmanageable type, but the current typing includes all variations of the attribute.
Other changes not directly related to ``self.stats`` are due to ``mypy``warnings.
This incorporate the feedback received in #4954
* Add ``CheckerStatistic`` class to ``pylint/typing``
* Guard `typing.Counter` import
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
I feel confident enough to fix my own last name.
|
|
|
|
| |
After PyCQA/astroid#1166 is merged, this test should become green.
|
|
|
|
|
|
|
| |
* Fix deprecation warning for AssignAttr
We should initialize nodes using their constructor
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Create a file for pylint.reporters.BaseWritter
* Calculate visitor name only once in Reporter nodes
Remove dead code that was always failing and replace it by
an attribute directly.
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
|
|
|
| |
* Add tests for dataclasses
This closes #4963 and is based on the fix in PyCQA/astroid#1165
|
| |
|
|
|
|
| |
Closes #5000
|
|
|
|
|
|
|
| |
updates:
- [github.com/asottile/pyupgrade: v2.25.0 → v2.26.0](https://github.com/asottile/pyupgrade/compare/v2.25.0...v2.26.0)
- [github.com/pre-commit/mirrors-prettier: v2.3.2 → v2.4.0](https://github.com/pre-commit/mirrors-prettier/compare/v2.3.2...v2.4.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
``__all__`` (#4953)
* Fix bad node being given as context for message
See https://github.com/PyCQA/pylint/issues/4711\#issuecomment-910020972
* Add a functional test for issue #4711
* Fix false positive invalid-all-format
Closes #4711
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixed 'no-self-check' for async functions.
* fixed 'docparams' for async functions.
* Added 'no-self-use' to the pylint disable comment in broken test.
* Added small changelog entry to Pylint 2.11.0 milestone.
* Added test: 'no-self-use' for async method.
* Added test: revamped 'docparams' functional tests to test all missing documentation.
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
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
|
|
|
|
|
|
| |
* Use ``overload`` to type ``get_global_option``
* Use type alias and TypeVar
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
| |
* 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 topic
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the requirements on [pre-commit](https://github.com/pre-commit/pre-commit) to permit the latest version.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.14.0...v2.15.0)
---
updated-dependencies:
- dependency-name: pre-commit
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|\
| |
| | |
Extend consider-using-in for attribute access
|
|/ |
|
| |
|
|
|
|
|
|
| |
* Add mypy_extensions to requirement for ``NoReturn``
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
| |
Based on discussion in #4787
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.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>
|
|
|
|
| |
Additional test based on a suggestion in #4907
|
| |
|
|
|
|
|
|
| |
Tuples can be created with inner tuples. This creates double parenthesis
which we flagged incorrectly.
This closes #4907
|
|
|
|
|
|
| |
Apparently this use case was supposed to be handled by the py3K
checker but as it was disabled all the time the issue has'nt
been handled at all for a long time.
|
|
|
|
|
|
| |
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.
|
|
|
| |
* In Python 3 'exec' is just a 'Call' node
|
|
|
|
|
|
| |
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
|