summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Apply suggestions from code reviewdependabot/pip/coverage-approx-eq-6.1Marc Mueller2021-11-111-1/+1
|
* Update requirements_test.txtPierre Sassoulas2021-11-041-0/+1
|
* Merge branch 'main' into dependabot/pip/coverage-approx-eq-6.1Pierre Sassoulas2021-11-0416-17/+216
|\
| * Update ``coveralls`` requirement to ~=3.3 (#5257)Daniël van Noord2021-11-041-1/+1
| |
| * Remove unwanted non-breaking whitespaces in comment (#5256)Pierre Sassoulas2021-11-043-13/+13
| |
| * Add script to generate new message category id (#5248)Daniël van Noord2021-11-043-0/+53
| |
| * Inspection for `with threading.Lock():` (#5245)Martin2021-11-036-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `with threading.Lock():` directly has no effect. Correct usage is: ``` lock = threading.Lock() with lock: ... ``` This applies for: * threading.Lock * threading.RLock * threading.Condition * threading.Semaphore * threading.BoundedSemaphore Signed-off-by: Martin Basti <mbasti@redhat.com>
| * Use single worker if importing `multiprocessing.synchronize` fails (#5238)Harshil2021-11-034-0/+13
| | | | | | | | | | * add test import for multiprocessing.synchronize Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
| * [pre-commit.ci] pre-commit autoupdate (#5243)pre-commit-ci[bot]2021-11-011-1/+1
| | | | | | | | | | | | updates: - [github.com/psf/black: 21.9b0 → 21.10b0](https://github.com/psf/black/compare/21.9b0...21.10b0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
| * Bump black from 21.9b0 to 21.10b0 (#5240)dependabot[bot]2021-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [black](https://github.com/psf/black) from 21.9b0 to 21.10b0. - [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 coverage requirement from ~=5.5 to ~=6.1dependabot[bot]2021-11-011-1/+1
|/ | | | | | | | | | | | | | Updates the requirements on [coverage](https://github.com/nedbat/coveragepy) to permit the latest version. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/coverage-5.5...6.1.1) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* Merge pull request #5233 from sgheppy/nographviz_fixAndreas Finkler2021-10-314-1/+7
|\ | | | | Nographviz fix
| * add changelog and contributor entryAntonio Quarta2021-10-313-0/+6
| |
| * fix accepted output format without graphvizAntonio Quarta2021-10-311-1/+1
|/
* Remove accidental print statementDaniël van Noord2021-10-311-1/+0
|
* Fix ``protected-access`` for attributes and methods of nested classes (#5232)Daniël van Noord2021-10-317-16/+123
| | | | | | | | | | | | | | | * 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>
* Allow no type in Numpy param docstrings for ``mising-param-doc`` (#5231)Daniël van Noord2021-10-314-6/+53
| | | | | This closes #5222 See https://numpydoc.readthedocs.io/en/latest/format.html#parameters for reference
* Unify all `<y or n>` metavars in option's help (#5229)Tushar Sadhwani2021-10-2913-22/+24
| | | | * Unify all `<y or n>` metavars
* Fix incorrect ``consider-using-ternary`` when condition is inferable as ↵Arianna Y2021-10-295-2/+17
| | | | | | | 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
* Fix tox dependencies with pypy (#5217)nozzy123nozzy2021-10-271-1/+3
|
* Migration to pytest from unittest for BaseChecker testsPierre Sassoulas2021-10-271-37/+35
|
* Create a new file for BaseChecker unit testsPierre Sassoulas2021-10-272-61/+69
|
* Fix deprecation 'check function will only accept sequence of string' (#5218)Pierre Sassoulas2021-10-272-14/+24
| | | | | * Fix deprecation 'check function will only accept sequence of string' * Add a test for Pylinter.check() deprecation
* Fix the deprecation of set_output in our code (#5209)Pierre Sassoulas2021-10-274-20/+31
| | | | | | | | | | * Fix the deprecation of set_output in our code * Add a test for the deprecation warning itself * Refactor the set_output from the MultiReporter We can remove set_output declaration because the function was already failing with a NotImplementedError before, so removing it make it fail another way
* Clean up some useless-super-delegation logic (#5193)Samuel Freilich2021-10-262-61/+47
| | | | | | | | | | | | | | * Clean up some useless-super-delegation logic In _definition_equivalent_to_call, avoid constructing a tuple and calling "all" on that. Instead, just check each condition in turn, terminating as soon as one fails. In _has_different_parameters_default_value, use a single sentinel value for a missing default instead of constructing a new one each call. Also construct the dict of comparators once instead of once each call. Restructure the logic to be less nested. Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Merge pull request #5198 from nozzy123nozzy/bugfix_of_propertyAndreas Finkler2021-10-2618-1/+79
|\ | | | | Fix exception of pyreverse in handling property function within a class.
| * Update tests/data/property_pattern.pynozzy123nozzy2021-10-261-5/+0
| | | | | | | | | | | | Remove the "main" function because this is meaningless for testing. Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
| * Modify sources along with results of pr review.Takahide Nojima2021-10-2615-41/+64
| | | | | | | | | | | | | | - move "tests/prop_data/*" to "tests/data/." - make tests/data/property_pattern.py correctly executable. - remove class members not related to "property" from test/data/property_pattern.py. - modify tests of pyreverse to pass all tests.
| * Fix exception of pyreverse in handling property function within a class.Takahide Nojima2021-10-266-0/+60
|/
* Add control flow check for ``undefined-variable`` in ``if ... else``Daniël van Noord2021-10-265-1/+85
| | | | Closes #3688
* Add configuration option ``exclude-too-few-public-methods`` (#5191)Mike Fiedler2021-10-2610-1/+75
| | | | | | | | | 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>
* Move the find_pylintrc function in find_default_config_files.pyPierre Sassoulas2021-10-262-11/+14
|
* Create a OLD_DEFAULT_PYLINT_HOME constantsPierre Sassoulas2021-10-264-7/+12
|
* Create a DEFAULT_PYLINT_HOME constant and upgrade help textPierre Sassoulas2021-10-263-7/+8
|
* Put the environnement help directly where it makes sensePierre Sassoulas2021-10-262-13/+15
|
* Add tests for assignment expressions in function defaults (#5188)Daniël van Noord2021-10-2510-3/+91
| | | | | | | | | * 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 backticks for any-all suggestion (#5207)Nick Drozd2021-10-253-8/+16
| | | | | | * Use backticks for any-all suggestion If the suggestion contains a string, then the suggestion's quotes can get mixed up with the the string's quotes.
* Enable for_any_all check (#5206)Nick Drozd2021-10-2512-96/+54
| | | | | | | * Enable for_any_all check, reword a few docstrings, shorten some loop variable names, and add typing on modified functions. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Add ``mixin-class-rgx`` option (#5203)Daniël van Noord2021-10-2512-15/+118
| | | | | Co-authored-by: Alpha <alpha@pokesplash.net> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add extension checker that suggests any/all statements from for loops (#5196)Arianna Y2021-10-259-0/+404
| | | | | | | | | * Add extension checker that suggests any/all statements from for loops * Suggest all/not all: If there are negated conditions, we can suggest an all/not all statement to move the 'not' out of the comprehension and call it only once. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Normalize input of ``ignore-paths`` for all path types (#5201)Daniël van Noord2021-10-248-43/+166
| | | | | Closes #5194 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix regression for ``_is_only_type_assignment`` (#5163)Daniël van Noord2021-10-236-43/+142
| | | | | | | | | | | | | | | | * Fix regression for ``_is_only_type_assignment`` This closes #5162 * Remove references to `name` * Better tests for assignment * Move walrus tests to different file * Fix tests with incorrect typing * Update typing of `defstmt` Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Make ``used-before-assignment`` consider classes in method annotation and ↵Daniël van Noord2021-10-2310-10/+126
| | | | | | | | | defaults (#5184) This closes #3771 Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix use-implicit-booleaness-not-comparison crash (#5176)Jaehoon Hwang2021-10-235-58/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix use-implicit-booleaness-not-comparison crash `use-implicit-booleaness-not-comparison` caused a crash due to `target_node` not being an instance of `NodeNG.Name` This fix will allow the checker to have a default handling when it encounters `target_node` other than `Calls`,`Name`, or `Attribute` * Added more comprehensive test for implicit_booealness_checker * Make implicit_booealness_checker to have default `variable_name` * Handle `Calls`,`Name`, or `Attribute` * Fix typing in ImplicitBooleanessChecker.base_classes_of_node * [implicit-booleaness] Add call nodes name in warnings * Use `BaseContainer` to check for empty tuple/list and use `as_string` for `Attribute` and `Name` nodes for message Using `BaseContainer` for checking for empty `tuple` and `list`. In addition, `is_base_container` checks for `FrozenSet` and `Set` as well. * Update test cases with cr concerns * Use `BaseContainer` when checking for empty list or tuple * Update `is_literal_tuple/list` to use `is_base_container` * Use `as_string` when giving out function or variable name for message. * Fix broken baseContainer test * Use safe_infer for inferencing `target_instance` * Swap opreators message * Address CR comments; no more try/catch for infer & Add more test cases * Add more test cases and changed few cases to cover more cases. * Remove `try/catch` from `safe_infer` since `safe_infer` will return `None` when it encounters exceptions. * Comparison from infer to be more explicit; using `None` instead of relying on `bool` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix test decorator for `PyLinter` options (#5195)Daniël van Noord2021-10-222-5/+18
|
* PR #5157 followup (#5192)Nick Pesce2021-10-211-10/+10
|
* Fix useless-super-delegation false positive when default keyword argument is ↵Nick Pesce2021-10-196-76/+70
| | | | | | | a variable. (#5157) Compare variable default args and simplify the logic of the checkers. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix double emitting of ``not-callable`` on inferrable ``properties``Daniël van Noord2021-10-195-9/+29
| | | | Closes #4426
* Fix asterisks parsing of ``mising-param-doc`` (#5175)Daniël van Noord2021-10-187-19/+65
| | | Closes #3733
* Make ``undefined-variable`` check line numbers of metaclass parametersDaniël van Noord2021-10-185-6/+34
|