summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update pre-commit requirement from ~=2.14 to ~=2.15dependabot/pip/pre-commit-approx-eq-2.15dependabot[bot]2021-09-061-1/+1
| | | | | | | | | | | | | | 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>
* Merge pull request #4971 from cdce8p/feat_consider-using-inAndreas Finkler2021-09-065-2/+14
|\ | | | | Extend consider-using-in for attribute access
| * Extend consider-using-in for attribute accessMarc Mueller2021-09-055-2/+14
|/
* Remove test dependency mypy-extensions (#4969)Marc Mueller2021-09-052-2/+6
|
* Add typing with `PyAnnotate` to `./tests` (#4950)Daniël van Noord2021-09-0469-775/+965
| | | | | | * Add mypy_extensions to requirement for ``NoReturn`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Moved ``consider-using-f-string`` to `RecommendationChecker` (#4957)Daniël van Noord2021-09-033-101/+108
| | | | | Based on discussion in #4787 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Refactor various typing related issues (#4940)Daniël van Noord2021-09-0347-349/+375
| | | | | | | | | | | | | | | * 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>
* Add test to ``superfluous-parens``Daniël van Noord2021-09-021-2/+5
| | | | Additional test based on a suggestion in #4907
* Remove unused ``visit_package`` functionDaniël van Noord2021-09-011-10/+0
|
* Fix false positive ``superfluous-parens`` for tuplesDaniël van Noord2021-09-016-27/+43
| | | | | | Tuples can be created with inner tuples. This creates double parenthesis which we flagged incorrectly. This closes #4907
* Fix the raising-bad-type warning for stringPierre Sassoulas2021-09-014-5/+11
| | | | | | 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.
* Extend ``unspecified-encoding`` checkerDaniël van Noord2021-09-015-18/+53
| | | | | | 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-0164-2868/+67
| | | | | | 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.
* Remove dead visit_exec method (#4943)Marc Mueller2021-09-011-5/+0
| | | * In Python 3 'exec' is just a 'Call' node
* Fix false positive `dict-iter-missing-items` for tuple keys (#4939)Daniël van Noord2021-08-315-1/+16
| | | | | | 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-317-7/+50
| | | | | | | | * 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-315-8/+28
| | | | Closes #4936
* Add a redirect from http to https in read the doc configurationPierre Sassoulas2021-08-311-0/+4
| | | | | The settings is done in https://readthedocs.org/dashboard/pylint/redirects/ Add an exact redirect.
* Change http links to https in setup.pyPierre Sassoulas2021-08-311-3/+3
|
* Fix faq.rst:138:undefined label: message-controlPierre Sassoulas2021-08-311-0/+2
|
* Fail on warning for read the docPierre Sassoulas2021-08-311-1/+2
|
* [pre-commit.ci] pre-commit autoupdate (#4934)pre-commit-ci[bot]2021-08-301-2/+2
| | | | | | | updates: - [github.com/asottile/pyupgrade: v2.24.0 → v2.25.0](https://github.com/asottile/pyupgrade/compare/v2.24.0...v2.25.0) - [github.com/psf/black: 21.7b0 → 21.8b0](https://github.com/psf/black/compare/21.7b0...21.8b0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Emit a correct invalid-name message when using multi-naming style. (#4924)Yilei "Dolee" Yang2021-08-307-8/+46
| | | | | | | | | | | | | | | | | | | | | | * 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 regression tests for PyCQA/astroid#1151David Liu2021-08-302-1/+54
|
* Add regression test for false positive on collections.abcPierre Sassoulas2021-08-302-0/+17
|
* Fix a typo in a LenChecker docstringPierre Sassoulas2021-08-301-1/+1
|
* Upgrade astroid to 2.7.3Pierre Sassoulas2021-08-302-2/+2
|
* Add a regression tests for dataclasses with fieldsPierre Sassoulas2021-08-303-0/+35
| | | | Refer to #4899, was fixed in astroid's https://github.com/PyCQA/astroid/pull/1144
* Add `use-set-for-membership` check (#4841)Marc Mueller2021-08-306-0/+112
| | | | | | | | | * 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>
* Bump black from 21.7b0 to 21.8b0 (#4930)dependabot[bot]2021-08-301-1/+1
| | | | | | | | | | | | | | | | Bumps [black](https://github.com/psf/black) from 21.7b0 to 21.8b0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:production ... 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-3010-67/+413
| | | | | | | | | | | * 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>
* Fix typo in assigment_from_no_return functional testsPierre Sassoulas2021-08-302-0/+0
|
* Remove async test for python 3.5 or lesserPierre Sassoulas2021-08-306-22/+8
|
* Remove functional test configuration for python version <=3.6.0Pierre Sassoulas2021-08-30109-147/+10
| | | | | We're only supporting python version > 3.6 so this became useless configuration.
* Merge abstract_class_instantiated in the same filePierre Sassoulas2021-08-307-29/+21
|
* Implement basic control flow checks for ``consider-using-with`` (#4929)Andreas Finkler2021-08-305-7/+111
| | | | | | | * 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
* Specifies that the pip freeze command should be run and its output pa… (#4928)hippo912021-08-301-0/+1
| | | | * Specifies that the pip freeze command should be run and its output pasted into the bug report
* Add ``Consider-using-f-string`` checker (#4796)Daniël van Noord2021-08-3084-384/+525
| | | | | | | | | | | | | | | | * 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>
* Upgrade ignored-parents help description (#4926)Melvin2021-08-282-1/+3
| | | * Upgrade ignored-parents help description
* Added myself to CONTRIBUTORS.txtPhilipp A2021-08-261-0/+2
|
* Rename URLsPhilipp A2021-08-261-6/+7
| | | The icons are inferred here: https://github.com/pypa/warehouse/blob/main/warehouse/templates/packaging/detail.html
* Update FUNDING.ymlPierre Sassoulas2021-08-231-0/+1
|
* [pre-commit.ci] pre-commit autoupdatepre-commit-ci[bot]2021-08-231-1/+1
| | | | | updates: - [github.com/asottile/pyupgrade: v2.23.3 → v2.24.0](https://github.com/asottile/pyupgrade/compare/v2.23.3...v2.24.0)
* Move back to a dev version following 2.10.2 releasePierre Sassoulas2021-08-212-2/+2
|
* Bump pylint to 2.10.2, update changelogv2.10.2Pierre Sassoulas2021-08-213-4/+10
|
* Fix a crash from astroid.InferenceError raised on copy.copyPierre Sassoulas2021-08-213-3/+29
| | | | Closes #4891
* Updated mypy checks (#4889)Marc Mueller2021-08-212-4/+2
| | | | | | | | | | | | | | | | | * Remove typing ignore for platformdirs * Use local environment for mypy pre-commit * Update ci workflow * Revert "Use local environment for mypy pre-commit" This reverts commit 2052d0a96946ac086430b87dfd9e29c8c43721f9. * Revert "Update ci workflow" This reverts commit a0f8174b29e972b1665655a1e29517e3bd7bc184. * Add platformdirs as additional dependency
* Require platformdirs 2.2.0 (#4890)Marc Mueller2021-08-211-1/+1
|
* Migrate from ``appdirs`` to ``platformdirs`` (#4887)Pierre Sassoulas2021-08-214-7/+13
| | | | | * Migrate from appdirs to platformdirs Closes #4886