summaryrefslogtreecommitdiff
path: root/tests/functional/a
Commit message (Collapse)AuthorAgeFilesLines
* Add new checker `kwarg-superseded-by-positional-arg` and fix a false ↵Mark Byrne2023-05-165-19/+45
| | | | | | | | | | positive (#8644) * Fix a false positive for ``redundant-keyword-arg`` when a function, with a keyword-only-parameter and ``**kwargs``, is called with a positional argument and a keyword argument where the keyword argument has the same name as the positional-only-parameter. * Add new checker ``kwarg-superseded-by-positional-arg`` which emits a warning message for the above scenario. Closes #8558 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix false negative for no-value-for-parameter: positional-only args and ↵Mark Byrne2023-04-143-0/+18
| | | | **kwargs (#8575)
* [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-2912-22/+22
|
* Add Python 3.8+ `asyncSetUp` to "defining-attr-methods" list (#8403)Samuel FORESTIER2023-03-112-0/+14
|
* Fix issues with new typing Union syntax (Py310) (#8122)Marc Mueller2023-02-013-0/+27
| | | | * Fix issues with new typing Union syntax (Py310) * Upgrade astroid to 2.14.1
* Update disallowed-name to flag module-level variables (#7808)Dani Alcala2023-01-251-1/+1
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* class attrs should not emit assigning-non-slot msg (#7987)Dani Alcala2022-12-303-8/+47
|
* [pypy3.8] Disable multiple-statements false positive on affected functional ↵Pierre Sassoulas2022-12-155-41/+58
| | | | tests
* Flag `superfluous-parens` if parentheses are used during string ↵Dani Alcala2022-11-131-1/+1
| | | | concatenation (#7752)
* Update wording to clarify overriding object. (#7504)Dani Alcala2022-09-202-23/+23
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Add child class name and confidence to ``abstract-method`` message (#7503)Dani Alcala2022-09-201-16/+16
| | | Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update assert-on-tuple for any populated tuple (#7468)Dani Alcala2022-09-192-7/+11
| | | | Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix false positive for ``too-many-function-args`` when a function call is ↵Mark Byrne2022-09-021-1/+18
| | | | | assigned to a class attribute inside the class where the function is defined. (#7395) Closes #6592
* Improve TypeVar name regex (#7322)Marc Mueller2022-08-191-2/+2
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Remove Python 2 code from the tests & refactor (#7320)Mark Byrne2022-08-1817-119/+116
| | | | | | | - 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>
* Fix tests for Python 3.11 (#7167)Adam Williamson2022-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ignore deprecated-module in access_attr_before_def_false_positive This is because telnetlib is deprecated in Python 3.11. It's hard to see exactly what this is testing - there's no great explanation in-line and the test predates the first commit to the git repo so we don't have a commit message to help. telnetlib will be removed in 3.13, though, so at that point we'll have to figure it out or drop the telnetlib part of the test. Signed-off-by: Adam Williamson <awilliam@redhat.com> * Split asyncio.coroutine tests and set max_pyver 3.10 for them iterable_context_py3 includes some checks that we don't emit errors for asyncio.coroutine, but asyncio.coroutine has been removed in Python 3.11, so we need to set a max version of 3.10 for these tests. Signed-off-by: Adam Williamson <awilliam@redhat.com> * Set max_pyver 3.10 for some deprecations removed in 3.11 The `binhex` module and `binascii.b2a_hqx()` function, which were deprecated in 3.9, are removed entirely in 3.11. Signed-off-by: Adam Williamson <awilliam@redhat.com> * Change syntax_error test for consistent output Python 3.11 changes the string representation of the SyntaxError triggered by this test - it now says "expected '('" instead of just "invalid syntax". This changes the test to use a different error (incomplete `for` loop) which still has just "invalid syntax" as its description in Python 3.11. This is the same 'bad code' used in the similar `test_stdin_syntaxerror` in the unit tests. Signed-off-by: Adam Williamson <awilliam@redhat.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Prevent additional `unsupported-binary-operation` messages for metaclasses ↵Jacob Walls2022-06-243-35/+44
| | | | | defining `__or__` (#7012) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Fix ``unsupported-binary-operation`` on classes that overload or (#6664)Tim Martin2022-06-233-1/+55
| | | | | | | | | | | | | * Use consistent location for NotFoundError Throughout this module we're using ``astroid.NotFoundError`` as an alias for ``astroid.exceptions.NotFoundError``, it seems best to be consistent. Closes #4951 Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Use main instead of master as main checker name (#6569)Daniël van Noord2022-05-103-3/+3
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Move no-self-use to optional extension (#6448)Marc Mueller2022-05-056-7/+6
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add `comparison-of-constants` checker (#6413)omarandlorraine2022-05-042-3/+3
| | | | | 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>
* C2901 & C2902: New checks for unnecessary lambda expression usage (#6004)Joe Young2022-05-047-45/+48
| | | | | Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Remove ``assign-to-new-keyword`` (#6421)Daniël van Noord2022-04-213-24/+0
|
* Remove the 'no-init' message tat was not emitted anywayPierre Sassoulas2022-04-182-2/+2
| | | | | | See https://github.com/PyCQA/pylint/issues/2409#issuecomment-1100952171 Closes #2409
* Normalize the pylint disables in functional testsPierre Sassoulas2022-04-182-2/+2
|
* [refactor] Simpler and more performant way to check for duplicate-argumentPierre Sassoulas2022-04-011-2/+1
|
* 'duplicate-argument-name' raises once for each set of duplicated argumentsPierre Sassoulas2022-04-011-1/+1
| | | | Instead of raising twice.
* 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>
* Make ``arguments-differ`` check extra parameters for default values (#5539)Daniël van Noord2022-03-244-9/+41
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Use ``node.position`` in ``add_message`` if available (#5897)Daniël van Noord2022-03-124-46/+46
|
* Move functional test files to new structureDaniël van Noord2022-02-1016-0/+0
|
* Fix assignment-from-none false negative case using list.sort() (#5738)orSolocate2022-02-022-0/+3
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add confidence level `CONTROL_FLOW` (#5709)Jacob Walls2022-01-261-3/+3
|
* Fix unprotected accesses to parent.name and add tests (#5675)Arianna Y2022-01-142-0/+28
|
* Fix typos over the whole codebase (#5540)Kian Meng, Ang2021-12-171-2/+2
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Fix assigning-non-slot false positive with setattr (#5457)Jake Lishman2021-12-151-0/+27
| | | | | | | | | | | | * 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>
* Fix #5371: Correctly count arguments to static methods missing @staticmethod ↵Jacob Walls2021-12-033-8/+30
| | | | | | | | decorator (#5412) * Fix #5371: Correctly count arguments to static methods missing @staticmethod decorator * Implementations of MapReduceMixin.reduce_map_data were actually not classmethods
* Move ``TestNameChecker`` to functional tests (#5421)Daniël van Noord2021-11-283-0/+24
|
* Move ``TestVariablesChecker`` to functional tests (#5400)Daniël van Noord2021-11-252-5/+13
|
* Update functional test expected output (#5349)Daniël van Noord2021-11-2423-192/+192
| | | | | | * 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>
* Move ``misplaced-comparison-constant`` to optional extension (#5298)Daniël van Noord2021-11-141-1/+1
| | | | | | | * Move ``misplaced-comparison-constant`` to optional extension * Update functional tests to increase coverage Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add tests for crash on assignment expressions in if statemenpyttsDaniël van Noord2021-11-121-0/+17
|
* Fix ``protected-access`` for attributes and methods of nested classes (#5232)Daniël van Noord2021-10-312-15/+91
| | | | | | | | | | | | | | | * Fix access to private function in inner class on protected-access bug * Add functional test for protected-access from inner class * Add Ikraduya to CONTRIBUTORS file * Add if statement to avoid potential bug * Fix ``protected-access`` for attributes and methods of nested classes This closes #3066 Co-authored-by: ikraduya <ikraduya@gmail.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add tests for assignment expressions in function defaults (#5188)Daniël van Noord2021-10-251-0/+0
| | | | | | | | | * Add tests for assignment expressions in function defaults Ref #3688 * Upgrade astroid to 2.8.4 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Use py-version for alternative union syntax check (#5160)Marc Mueller2021-10-153-2/+9
|
* Fix false-positive undefined-variable with Lambda, IfExp, and := (#5044)Marc Mueller2021-09-211-1/+6
|
* Spelling and grammar fixesVille Skyttä2021-09-174-4/+4
|
* Fix no-self-use and docparams extension for async functions/methods (#4986)SupImDos2021-09-111-1/+1
| | | | | | | | | | | | | | | | * 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>
* Remove the python3 porting mode from the codebasePierre Sassoulas2021-09-016-6/+6
| | | | | | 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.