summaryrefslogtreecommitdiff
path: root/tests/functional/t
Commit message (Collapse)AuthorAgeFilesLines
* Fix a false negative for ``too-many-arguments`` and positional-only and ↵Mark Byrne2023-05-152-0/+6
| | | | | | | | keyword-only arguments (#8674) Closes #8667
* Also check the typealias naming style for TypeAlias variables defined in ↵Yilei "Dolee" Yang2023-04-072-0/+12
| | | | functions. (#8537)
* Fix typelias `invalid-name` false positives for Union variables without ↵Yilei "Dolee" Yang2023-04-072-3/+6
| | | | assignment. (#8541)
* [cleanup] Upgrade more doc following the PyCQA migrationPierre Sassoulas2023-03-311-1/+1
|
* [PyCQA migration] Upgrade links to the repositories in code and doc (#8514)Pierre Sassoulas2023-03-299-11/+11
|
* Allow integers in TypeAlias names (#8488)Stephane Odul2023-03-282-10/+14
|
* Don't consider ``Union`` to always be a type alias (#8489)Daniël van Noord2023-03-231-0/+4
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add ``invalid-name`` check for ``TypeAlias`` names (#7116)Daniël van Noord2023-02-266-0/+52
|
* [doc] Add an example for 'too-many-locals' (#8306)Pierre Sassoulas2023-02-171-4/+4
|
* Fix invalid-name for typing_extensions.TypeVar (#8089)Marc Mueller2023-01-204-2/+20
|
* Fixes false positive for `try-except-raise` with multiple exceptions in one ↵fly2023-01-122-2/+14
| | | | | except statement if exception are in different namespace (#8052) Closes #8051
* [pypy3.8] Disable multiple-statements false positive on affected functional ↵Pierre Sassoulas2022-12-154-3/+21
| | | | tests
* Fix a false positive for `simplify-boolean-expression` when multiple values ↵Jacob Walls2022-10-162-15/+33
| | | | | inferred (#7627) Add a keyword-only `compare_constants` argument to `safe_infer`.
* Don't report ``trailing-whitespaces`` within strings (#7342)Daniël van Noord2022-08-311-0/+21
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Don't emit ``trailing-whitespace`` twice for multi-line docstrings (#7335)Daniël van Noord2022-08-222-7/+19
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Improve TypeVar name regex (#7322)Marc Mueller2022-08-192-10/+16
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Remove Python 2 code from the tests & refactor (#7320)Mark Byrne2022-08-1814-32/+29
| | | | | | | - Refactor Classes which inherit from `object`. - Remove `import print_function from __future__`. - Remove assignments to `__revision__` from the functional test module when it is never used throughout the module. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Move no-self-use to optional extension (#6448)Marc Mueller2022-05-051-1/+1
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add `comparison-of-constants` checker (#6413)omarandlorraine2022-05-041-1/+1
| | | | | Co-authored-by: Sam M W <smw@alertergroup.co.uk> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Ignore underscore as a local variable (#6492)Andy Young2022-05-031-0/+24
|
* Add optional check `redefined-loop-name` (#5649)Jacob Walls2022-05-011-2/+2
| | | | | | | | | | | | * Also change message type for inner loops overwriting the outer loop variable from `redefined-outer-name` to `redefined-loop-name` * Update redefined-outer-name description * Add coverage and fix preexisting false positive When the check for inner loops redefining outer loop variables was redefined-outer-name, it assumed enclosing for-loops were in the same namespace. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Add ``--minimal-messages-config`` option for functional tests (#6246)Andreas Finkler2022-04-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ``--minimal-messages-config`` option for functional tests * Add test file option to exclude from --minimal-messages-config run. * Fix ``too-many-branches`` false negative * Fix ``access-member-before-definition`` false negative * Fix ``consider-using-min-builtin`` and ``consider-using-max-builtin`` false negatives * Fix ``consider-using-with`` false negative * Exclude ``deprecated-module`` tests from ``--minimal-messages-config`` run. Have to find out how the list of deprecated modules is built first. * Update doc/whatsnew/2.14.rst * Ignore deprecated module false negatives * Fix ``deprecated-typing-alias`` false negative * Skip tests for ``fixme`` message, don't know yet how enable/disable affects TokenChecker/RawChecker * Exclude functional test for various logging checks, as the output string depends on what messages are enabled. * Fix false negative for ``nan-comparison`` * Fix false negative for ``non-ascii-module-import`` * Fix false negative for ``non-ascii-file-name`` * Skip tests for logging messages * Fix false negative for ``undefined-variable`` in ``metaclass`` argument * Exclude test for ``catching-non-exception``. ``exc._all_bases_known`` is ``False`` when enabling just this message. * Exclude ``ungrouped_imports_suppression``. ``useless-suppression`` is triggered too often in this case. * Fix false negative for ``use-a-generator`` * Exclude functional tests for ``useless-suppression`` from ``--minimal-messages-config`` * Exclude another deprecation check from ``--minimal-messages-config`` run * Update tests/testutils/data/m/minimal_messages_config.py Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* New check: TypeVar name mismatch (#6168)Joe Young2022-04-042-0/+66
| | | | | | | * TypeVar name mismatch check * Fix double hashes in changelogs Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* New check C0106: typevar-double-invariance (#6015)Joe Young2022-04-045-29/+47
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* C2801: New check for manual __dunder__ methods (#5938)Joe Young2022-03-301-1/+1
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Loosen TypeVar name pattern (#5983)Marc Mueller2022-03-262-9/+13
|
* Create a ``TypeVar`` style for ``invalid-name`` (#5894)Daniël van Noord2022-03-245-0/+81
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Use ``node.position`` in ``add_message`` if available (#5897)Daniël van Noord2022-03-1212-17/+17
|
* Add ``typevar-name-missing-variance`` checker (#5825)Daniël van Noord2022-03-112-0/+90
| | | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Yudaka <dakala@tuta.io>
* Fix typos over the whole codebase (#5540)Kian Meng, Ang2021-12-171-1/+1
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Fix #3675: `safe_infer()` finds ambiguity among function definitions when ↵Jacob Walls2021-12-141-0/+19
| | | | | number of arguments differ (#5409) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* New checker - Detect use of unnecessary ellipsis (#5470)Mark Byrne2021-12-131-1/+0
| | | | Closes #5460
* Add typing to LintModuleOutputUpdate._check_output_textPierre Sassoulas2021-12-033-3/+3
| | | | Better typing for test options and fix existing issue
* Update functional test expected output (#5349)Daniël van Noord2021-11-2423-56/+56
| | | | | | * Add ``confidence`` to all expected functional test outputs * Make OutputLine accept end_line and end_column Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix incorrect ``consider-using-ternary`` when condition is inferable as ↵Arianna Y2021-10-292-0/+7
| | | | | | | False (#5227) * Fix incorrect ``consider-using-ternary`` when condition is inferrable as False * Properly infer the condition in old ternary statements and suggest ``simplify-boolean-expression`` over ``consider-using-ternary`` if it is False
* Add configuration option ``exclude-too-few-public-methods`` (#5191)Mike Fiedler2021-10-263-0/+19
| | | | | | | | | Allow excluding classes based on their ancestors from the ``too-few-public-methods`` checker. Closes #3370 Signed-off-by: Mike Fiedler <miketheman@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Remove functional test configuration for python version <=3.6.0Pierre Sassoulas2021-08-304-8/+0
| | | | | We're only supporting python version > 3.6 so this became useless configuration.
* Add ``Consider-using-f-string`` checker (#4796)Daniël van Noord2021-08-301-1/+1
| | | | | | | | | | | | | | | | * 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>
* Limit the dataclasses tests to python 3.7Pierre Sassoulas2021-08-164-19/+21
|
* Additional tests for PyCQA/astroid#1126David Liu2021-08-162-1/+20
|
* Add ignored-parents option to design checker (#4758)Rebecca Turner2021-07-283-0/+44
| | | | | | | | | | | * Add ignored-parents option to design checker This allows users to specify classes to ignore while counting parent classes. Partially closes #3057 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add regression test TypedDict not-callable (#4717)Marc Mueller2021-07-191-0/+6
|
* Add a regression test following issue #4610Pierre Sassoulas2021-06-291-1/+8
|
* Add a test for too-many-statements when modified by configurationPierre Sassoulas2021-06-173-3/+14
|
* Moved typing extension testsMarc Mueller2021-06-1018-463/+0
|
* Add regression test for no-member with generic base class (#4471)Marc Mueller2021-05-301-1/+19
|
* Customize arguments-differ error messages (#4422)Konstantina Saketou2021-05-051-1/+1
| | | | | | Changes the output messages of arguments-differ based on different error cases. It is part one of the issue #3536
* Fix too-many-ancestorsMarc Mueller2021-04-282-2/+23
|
* Add new extension TypingChecker (#4382)Marc Mueller2021-04-2418-0/+463
|
* Update ``astroid`` to 2.5.3 (#4334)Marc Mueller2021-04-102-0/+16
| | | | * Add test case for typing.Generic with ABCMeta