summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add typing to ``_determine_callable`` (#5548)Daniël van Noord2021-12-171-4/+20
|
* Fix crash on uninferable decorators on Python 3.6 and 3.7 (#5549)Daniël van Noord2021-12-175-1/+16
| | | Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Add regression test for issue #5382 (#5550)Daniël van Noord2021-12-171-0/+29
|
* Fix ``not-callable`` for attributes that alias ``NamedTuple`` (#5537)Daniël van Noord2021-12-175-20/+55
|
* Fix typos over the whole codebase (#5540)Kian Meng, Ang2021-12-1730-55/+57
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* [refactor] Create a file for the ClassChecker in pylint.classesPierre Sassoulas2021-12-172-2048/+2053
|
* [refactor] Create a file for the SpecialMethodsChecker in pylint.classesPierre Sassoulas2021-12-172-369/+387
|
* Style following review: better docstringPierre Sassoulas2021-12-171-2/+1
|
* [refactor] Create a package in order to be able to burst classes.pyPierre Sassoulas2021-12-171-0/+0
|
* Factor out `_uncertain_nodes_in_except_blocks()` (#5541)Jacob Walls2021-12-171-34/+51
|
* Add ``future=True`` to all ``NodeNG.statement()`` calls (#5310)Daniël van Noord2021-12-167-32/+64
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Upgrade mypy to 0.920 (#5535)Marc Mueller2021-12-165-5/+9
|
* Fix assigning-non-slot false positive with setattr (#5457)Jake Lishman2021-12-155-0/+47
| | | | | | | | | | | | * Fix assigning-non-slot false positive with setattr Previously, if a class was slotted and overrode `__setattr__`, `assigning-non-slot` would be issued when assigning to attributes. With `__setattr__` defined, we cannot infer if it is an error to assign to an attribute, so we suppress the error. Fix #3793 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add additional test cases used-before-assignment with try-except (#5523)Marc Mueller2021-12-152-1/+37
|
* Update typing of reporter attributes in ``PyLinter`` (#5525)Daniël van Noord2021-12-152-14/+18
|
* Enable missing-raises-doc to understand class hierarchies (#5278)kasium2021-12-158-18/+111
| | | | | | | | | | | | | Before, missing-raises-doc could not understand class hierarchies but just compared names. So, when a method documented a raise of a parent class, but a child exception was raised, the check failed. With this change, if the name compare doesn't help, the exception class hierarchy is checked. For that, possible_exc_types was changed to return classes instead of names Resolved #4955 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Produce a score of 0 for fatal errors and add fatal to score evaluation (#5521)Jacob Walls2021-12-147-10/+33
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* typecheck: simplify variadic positional detection (#5417)Jérome Perrin2021-12-144-14/+33
| | | | | | | | The isinstance checks were not necessary here and caused several false positives where a function with variadic positional argument was called, like for example when the call is used as a function argument, in a if, while or with statement. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix #3675: `safe_infer()` finds ambiguity among function definitions when ↵Jacob Walls2021-12-145-2/+32
| | | | | number of arguments differ (#5409) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Modify the description of HIGH confidence for accuracyPierre Sassoulas2021-12-141-1/+1
|
* Fix the typing of pylint.interfaces.implementsPierre Sassoulas2021-12-141-2/+6
|
* Fix typo in pylint/interfaces.pyPierre Sassoulas2021-12-141-3/+3
|
* Add Confidences in pylint.interfaces APIPierre Sassoulas2021-12-141-3/+13
|
* Check `node` location attributes in unittests and update tests (#5383)Daniël van Noord2021-12-1310-15/+239
| | | | | | | | | | | | | | | | | | | | | | * Allow checking of `end_col_offset` and `end_lineno` in unittests * Allow checking of `col_offset` in unittests * Allow checking of `lineno` in unittests * Update tests for ``TestVariablesChecker`` * Fix ``TestMultiNamingStyle`` * Update tests for ``TestImportsChecker`` * Add location attributes to messages of ``TestTypeChecker`` * Add location params to ``TestMessage``'s of ``TestDeprecatedChecker`` * Add location params to ``TestMessage``'s of ``TestTypeCheckerOnDecorators`` * Add changelog and ``DeprecationWarning``
* New checker - Detect use of unnecessary ellipsis (#5470)Mark Byrne2021-12-138-3/+161
| | | | Closes #5460
* Fix false-positive 'used-before-assignment' for assignments in except blocks ↵Jacob Walls2021-12-135-7/+55
| | | | following try blocks that return (#5506)
* Move tests from ``TestConfusingConsecutiveElifChecker`` to functional tests ↵Daniël van Noord2021-12-133-205/+111
| | | | | | | (#5517) * Remove some redundant test Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Move tests from ``TestComparison`` to functional tests (#5520)Daniël van Noord2021-12-135-134/+31
| | | | * Remove some redundant tests
* Remove redundant tests in ``TestWhileUsed`` (#5518)Daniël van Noord2021-12-131-25/+0
|
* Update pytest-xdist requirement from ~=2.4 to ~=2.5dependabot[bot]2021-12-131-1/+1
| | | | | | | | | | | | | | Updates the requirements on [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest-xdist/releases) - [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v2.4.0...v2.5.0) --- updated-dependencies: - dependency-name: pytest-xdist dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* Bump actions/download-artifact from 2.0.10 to 2.1.0dependabot[bot]2021-12-131-1/+1
| | | | | | | | | | | | | | Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2.0.10 to 2.1.0. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v2.0.10...v2.1.0) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* Bump actions/upload-artifact from 2.2.4 to 2.3.0dependabot[bot]2021-12-131-2/+2
| | | | | | | | | | | | | | Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.4 to 2.3.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2.2.4...v2.3.0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* Unify validation of functional test option files (#5510)Daniël van Noord2021-12-132-10/+9
|
* Style - Remove unrelated error in tests for unnecessary-dict-index-lookupPierre Sassoulas2021-12-132-43/+48
| | | | So it's easier to focus on the real error we're testing.
* Add a DeprecationWarning to set_config_directly (#5511)Daniël van Noord2021-12-132-0/+24
|
* Move tests from ``TestParamDocChecker`` to functional tests (#5509)Daniël van Noord2021-12-1320-305/+212
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Emit `used-before-assignment` in final or except blocks where try ↵Jacob Walls2021-12-137-7/+77
| | | | | | | statements could have failed (#5384) * Emit `used-before-assignment` in final or except blocks where try statements could have failed Fix #85, #2615
* Move ``Numpy`` tests from ``TestParamDocChecker`` to functional tests (#5507)Daniël van Noord2021-12-125-151/+134
|
* Fix incorrect classification of property docstrings in Numpy-style (#5498)Daniël van Noord2021-12-127-64/+80
|
* Fix #5504: Fix crash if the output of items() is assigned to a 1-tuple (#5505)Jacob Walls2021-12-124-0/+19
| | | * Fix #5504: Fix crash if the output of items() is assigned to a 1-tuple
* Fix #4761: Emit `used-before-assignment` where single assignment only made ↵Jacob Walls2021-12-119-13/+97
| | | | | | in except blocks (#5402) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Move some of the Numpy tests out of ``TestParamDocChecker`` (#5492)Daniël van Noord2021-12-086-589/+481
|
* Move tests for Google docstrings from ``TestParamDocChecker`` to functional ↵Daniël van Noord2021-12-0710-816/+626
| | | | | tests (#5484) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [pre-commit.ci] pre-commit autoupdate (#5487)pre-commit-ci[bot]2021-12-061-2/+2
| | | | | | | updates: - [github.com/psf/black: 21.11b1 → 21.12b0](https://github.com/psf/black/compare/21.11b1...21.12b0) - [github.com/pre-commit/mirrors-prettier: v2.5.0 → v2.5.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.5.0...v2.5.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Bump black from 21.11b1 to 21.12b0 (#5481)dependabot[bot]2021-12-061-1/+1
| | | | | | | | | | | | | | | | Bumps [black](https://github.com/psf/black) from 21.11b1 to 21.12b0. - [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>
* Update pre-commit requirement from ~=2.15 to ~=2.16 (#5482)dependabot[bot]2021-12-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.15.0...v2.16.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>
* fix deleting files for pyreverse tests (#5476)Antonio Quarta2021-12-051-1/+7
|
* Treat `typing.NamedTuple` self as a sequence (#5346)Mark Byrne2021-12-056-17/+63
| | | | | | | | | | | * Treat `typing.NamedTuple` self as a sequence Closes #5312 * Support emmitting `unbalanced-tuple-unpacking` with `typing.NamedTuple` * Add typehint and default to `None` * Use Marc's suggested improvements
* Revert renaming extension tests (#5473)Marc Mueller2021-12-0532-14/+14
| | | | * Split py_version_35 test
* Add tempfile.TemporaryFile to CALLS_RETURNING_CONTEXT_MANAGERSJacob Walls2021-12-041-0/+1
|