summaryrefslogtreecommitdiff
path: root/tests/checkers
Commit message (Collapse)AuthorAgeFilesLines
* Tighten design constraints (#8115)Nick Drozd2023-01-282-0/+2
| | | | | | | | | | | | | * Lower max locals * Lower max statements * Lower max try statements * Lower max branches * Lower max args * Cut design constraints with default values
* Add `--allow-reexport-from-package` option (#8124)Marc Mueller2023-01-281-0/+43
|
* add test for get msg defclavedeluna2023-01-251-0/+10
|
* add test for Uninferableclavedeluna2023-01-241-0/+14
|
* Add test for existing preferred-modules functionality (#8093)Dave Bunten2023-01-241-0/+23
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* [style] Limit line length and complexity using flake8 (#8064)Pierre Sassoulas2023-01-161-34/+19
| | | 125 is a good start. The check was activated in pylint with value = 100, but flake8 is less lenient than pylint and does not make any exceptions (for docstrings, strings and comments in particular).
* [pre-commit] Upgrade to black 23.1a1 with 2023's formatting (#7965)Pierre Sassoulas2022-12-274-7/+1
|
* Fix end_col_offset deprecation msg (#7823)Dani Alcala2022-11-221-1/+1
|
* Fix ``deprecated-method`` false positive with aliases (#7795)Dani Alcala2022-11-191-5/+21
| | | | | When alias for method is similar to name of deprecated method. Closes #5886
* Fix a false negative for ``unused-import`` (#7678)Mark Byrne2022-11-091-6/+6
| | | | | | | | | | | * Fix a false negative for ``unused-import`` when a constant inside ``typing.Annotated`` was treated as a reference to an import. * Update with Daniël's suggestions: - More understandable function parameter name. - Update function parameter type: Expect a tuple of strings. Closes #7547
* Finish unfinished typing in non core directories (#7443)Daniël van Noord2022-09-094-8/+8
| | | | | | | | * Add typing to setup calls in documentation folder * Finish some incomplete typing signatures in script * Add typing to unfinished signatures in the tests directory
* Finish some incomplete typing signatures (#7442)Daniël van Noord2022-09-092-9/+13
|
* Add typing to several test files (#7440)Daniël van Noord2022-09-094-8/+12
|
* Fix #3299 false positives with names in string literal type annotations (#7400)Levi Gruspe2022-09-041-0/+26
| | | | | Don't emit 'unused-variable' or 'unused-import' on names in string literal type annotations (#3299) Don't treat strings inside typing.Literal as names
* Complete typing of all generic types (#7406)Daniël van Noord2022-09-041-6/+9
| | | | And update ``mypy`` configuration
* Revert "Fix the failure to lint modules contained under an identically named ↵Jacob Walls2022-08-131-2/+1
| | | | | | | | | directory" (#7304) This reverts commit 3ebb700aed88a427011c2e88705f66ec0b3830a4. * Add regression test for namespace packages under directory on path * Fix expected result in `test_relative_beyond_top_level_two`
* Clean up beyond_top_level tests (#7279)Daniël van Noord2022-08-121-26/+41
|
* Add xfail for `test_relative_beyond_top_level_two`Jacob Walls2022-08-031-0/+4
| | | | It uses epylint to run these tests, but since epylint manipulates cwd, that confounds what is under test
* [typing] Add typing to the tests directory (#7183)Pierre Sassoulas2022-07-148-41/+38
|
* Remove never run test (#6520)Daniël van Noord2022-05-061-10/+0
|
* spellcheck will skip the rule names of mypy inline directives (#5929)Eli Fine2022-05-061-1/+19
| | | | Co-authored-by: Eli Fine <eli.fine@resilience.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Change default values of ``ignore-imports`` and ``ignore-signatures`` (#6500)Daniël van Noord2022-05-051-0/+2
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix AstCallbackMethod typing (#6445)Marc Mueller2022-05-051-2/+3
|
* Remove some words from custom dictionary and update spellingDaniël van Noord2022-04-261-1/+1
|
* [spelling] Remove remaining typoes detected by the spelling checkerPierre Sassoulas2022-04-261-1/+1
|
* Use an empty pylintrc for tests using project's pylintrc implicitelyPierre Sassoulas2022-04-261-2/+6
| | | | | | | | | | We don't want to use the project's pylintrc during tests, because it means that a change in our config could break tests. But we want to see if the changes to the default break tests. Create a private '_Run' class in pylint.testutil._run Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Add two assertions for reporterDaniël van Noord2022-04-211-0/+2
|
* Remove ``IAstroidChecker`` from ``__implements__``Daniël van Noord2022-04-191-2/+1
|
* Deprecate ``MapReduceMixin`` and implements its methods in ``BaseChecker`` ↵Daniël van Noord2022-04-191-1/+1
| | | | | | (#6383) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Improve the ``__gt__`` method of Checkers (#6355)Daniël van Noord2022-04-161-3/+31
|
* Deprecate ``check_messages`` in favor of ``only_required_for_messages`` (#6196)Andreas Finkler2022-04-161-0/+15
| | | | | | * Add TypeVars for ``BaseChecker`` subclasses and AST callbacks Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Deprecate ``get_global_option``Daniël van Noord2022-04-151-3/+2
|
* Use ``python-typing-update`` on second half of the ``tests`` directoryDaniël van Noord2022-04-148-34/+41
|
* Use ``namespace`` in ``PyLinter`` and the functional config tests (#6271)Daniël van Noord2022-04-121-9/+6
| | | | | | | * Use callback actions in ``PyLinter`` * Turn off ``optparse`` command line parsing * No longer emit ``bad-configuration-section`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Deprecate ``load_command_line_configuration``Daniël van Noord2022-04-111-3/+5
|
* Make ``linter`` non-optional for ``BaseChecker`` (#6188)Daniël van Noord2022-04-111-0/+7
|
* increase timeout value for test_issue_5724 (#6241)Moody2022-04-091-1/+1
|
* Use ``argparse`` config handler in ``similar.py``Daniël van Noord2022-04-021-1/+1
|
* Total ordering unit test for BaseChecker (#6059)Joe Young2022-03-311-0/+21
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* [refactor] Create a package for the NameChecker in pylint.checker.basePierre Sassoulas2022-03-243-260/+275
|
* [refactor] Create a package in order to be able to burst base.pyPierre Sassoulas2022-03-241-0/+0
|
* Create a ``TypeVar`` style for ``invalid-name`` (#5894)Daniël van Noord2022-03-241-2/+2
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Add a pre-commit hook to check the copyright noticePierre Sassoulas2022-03-2423-16/+49
| | | | | Fix the existing file so they have a notice. No header for setup.py or examples or doc
* Simplify hard to maintain copyright noticePierre Sassoulas2022-03-2414-202/+14
| | | | | | git is the source of truth for the copyright, copyrite (the tool) was taking exponentially longer with each release, and it's polluting the code with sometime as much as 50 lines of names.
* Use pytest-timeout for testsSergey B Kirpichev2022-03-181-30/+14
|
* Optimize handling of long lines for checkers like 'missing-final-newline' ↵Sergey B Kirpichev2022-03-161-0/+15
| | | | | | | | | | | | | | (#5925) * Fix parsing of long lines when ``missing-final-newline`` is enabled * Adapt fa31b6b6 to be backward-compatible Fixes #5724 Also address comments from the PR PyCQA/pylint#5786 Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix end position in unittests (#5904)Daniël van Noord2022-03-121-9/+9
| | | | * Fix end position in unittests * Add pragma's for warnings
* Fixes for tests due to new ``tolineno`` behaviourDaniël van Noord2022-03-122-4/+3
|
* Fix matching note tags with a non-word char last (#5859)dbrookman2022-03-041-0/+10
| | | | | | | | | | | | | Using "\b" at the end of these patterns will only match note tags that end in an alphanumeric character, immediately followed by a non-alphanumeric character, or the end of the string. This is due to "\b" being defined as a boundary between a word character ("\w") and a non-word character ("\W"), or the end of the string. This leads to deviations like "???" being ignored when specified. Swapping "\b" for a positive lookahead that targets a whitespace, a colon, or the end of a string accounts for this. Closes #5840.
* Update ``pydocstringformatter`` to 0.4.0 (#5787)Daniël van Noord2022-02-1010-17/+17
|