aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-18Add license, metadata, and OWNERS files.HEADndk-r27-rc1ndk-r26dndk-r26cndk-r26bndk-r26-rc1ndk-r26-beta1ndk-r26ndk-r25cndk-r25bndk-r25-beta4ndk-r25-beta3ndk-r25-beta2ndk-r25-beta1ndk-r25ndk-r24-rc1ndk-r24ndk-r27-releasendk-r26-releasendk-r25-releasendk-r24-releasemastermainDan Albert
Test: None Bug: http://b/206656351 Change-Id: Ifccc674407957534eac217210bc91e1307c089c6
2021-11-18Merge upstream tag v2.11.1.Dan Albert
Test: None Bug: http://b/206656351 Change-Id: I7831112fa3014bf7998432f9e1ac96be18fca60c
2021-11-18Initial empty repositoryRoman Yepishev
2021-09-16Bump pylint to 2.11.1, update changelogPierre Sassoulas
2021-09-16Add typing for ``json_reporter`` and sub-classesDaniël van Noord
2021-09-16Fix ``unspecified-encoding`` for `Path()`Daniël van Noord
This closes #5017
2021-09-16Move back to a dev version following 2.11.0 releasePierre Sassoulas
2021-09-16Bump pylint to 2.11.0, update changelogPierre Sassoulas
2021-09-16Add typing to ``filepath`` (#4980)Daniël van Noord
* 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>
2021-09-16Add typing in ``pylint.reporters`` (#5004)Pierre Sassoulas
* 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>
2021-09-16Move methods to `BaseLayout` (#5015)Daniël van Noord
* Move methods to `BaseLayout` and change typing, see https://github.com/PyCQA/pylint/pull/5004#discussion_r708532947
2021-09-15Move PyreverseConfig to pylint.testutil (#5013)Pierre Sassoulas
See : https://github.com/PyCQA/pylint/pull/5010#issuecomment-920291278
2021-09-15Add typing to all calls to ``self.stats`` (#4973)Daniël van Noord
* 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>
2021-09-15Remove most `typing.cast()` calls (#4995)Daniël van Noord
2021-09-15Fix PyreverseConfig imports in pyreverse's testsPierre Sassoulas
2021-09-14Change lines to lists (#5009)Daniël van Noord
2021-09-14Update CONTRIBUTORS.txtDimitri Prybysh
I feel confident enough to fix my own last name.
2021-09-14Add functional test demonstrating #4370Dimitri Prybysh
After PyCQA/astroid#1166 is merged, this test should become green.
2021-09-14Fix deprecation warning for AssignAttr in tests (#5006)Pierre Sassoulas
* Fix deprecation warning for AssignAttr We should initialize nodes using their constructor Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-09-14Fix false positive ``unused-private-member`` for accessing attributes in a ↵yushao2
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>
2021-09-14Make consider-iterating-dictionary consider membership check (#4997)Daniël van Noord
2021-09-14Pylint reporter cleanup (#5003)Pierre Sassoulas
* 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>
2021-09-14Add tests for dataclasses (#4967)Daniël van Noord
* Add tests for dataclasses This closes #4963 and is based on the fix in PyCQA/astroid#1165
2021-09-14Upgrade astroid to 2.8.0Pierre Sassoulas
2021-09-14Fix false negative for use-symbolic-messagePierre Sassoulas
Closes #5000
2021-09-14[pre-commit.ci] pre-commit autoupdate (#4998)pre-commit-ci[bot]
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>
2021-09-13Fix bad node given to a message and false positive invalide format for ↵Pierre Sassoulas
``__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
2021-09-13Bump sphinx from 4.1.2 to 4.2.0dependabot[bot]
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>
2021-09-13Add typing to most reference of ``stream``Daniël van Noord
2021-09-13Type ``process_module`` and update argument namesDaniël van Noord
2021-09-11Documentation for ``pyreverse`` and ``symilar`` (#4992)Andreas Finkler
* 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
2021-09-11Make ``global-variable-not-assigned`` check local scope (#4990)Daniël van Noord
* 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>
2021-09-11Fix no-self-use and docparams extension for async functions/methods (#4986)SupImDos
* 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>
2021-09-10Fix bug with cache's parent directory not existing (#4988)Daniël van Noord
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
2021-09-08Use overload to type get_global_option (#4978)Daniël van Noord
* Use ``overload`` to type ``get_global_option`` * Use type alias and TypeVar Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-09-07fix false positive W0238 with private staticmethod used from classmethod (#4949)Kayran Schmidt
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2021-09-07Make ``min-similarity-lines == 0`` stop similarity check (#4970)Daniël van Noord
* 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>
2021-09-07Merge pull request #4979 from jacobtylerwalls/useless-suppression-typoAndreas Finkler
Fix typos in useless-suppression topic
2021-09-06Fix typos in useless-suppression topicJacob Walls
2021-09-06Add additional test case - consider-using-assignment-expr (#4975)Marc Mueller
2021-09-06Update pre-commit requirement from ~=2.14 to ~=2.15 (#4974)dependabot[bot]
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>
2021-09-06Merge pull request #4971 from cdce8p/feat_consider-using-inAndreas Finkler
Extend consider-using-in for attribute access
2021-09-05Extend consider-using-in for attribute accessMarc Mueller
2021-09-05Remove test dependency mypy-extensions (#4969)Marc Mueller
2021-09-04Add typing with `PyAnnotate` to `./tests` (#4950)Daniël van Noord
* Add mypy_extensions to requirement for ``NoReturn`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2021-09-03Moved ``consider-using-f-string`` to `RecommendationChecker` (#4957)Daniël van Noord
Based on discussion in #4787 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2021-09-03Refactor various typing related issues (#4940)Daniël van Noord
* 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>
2021-09-02Add test to ``superfluous-parens``Daniël van Noord
Additional test based on a suggestion in #4907
2021-09-01Remove unused ``visit_package`` functionDaniël van Noord
2021-09-01Fix false positive ``superfluous-parens`` for tuplesDaniël van Noord
Tuples can be created with inner tuples. This creates double parenthesis which we flagged incorrectly. This closes #4907