summaryrefslogtreecommitdiff
path: root/pylint/checkers/base
Commit message (Collapse)AuthorAgeFilesLines
* Fix typelias `invalid-name` false positives for Union variables without ↵github-actions[bot]2023-04-071-4/+1
| | | | | | | assignment. (#8541) (#8548) (cherry picked from commit cb255eaaed8bba6bec1f7bf5d4cde15821c1dd46) Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
* [Backport maintenance/2.17.x] Allow integers in TypeAlias names. (#8507)github-actions[bot]2023-03-281-1/+3
| | | | Co-authored-by: Stephane Odul <1504511+sodul@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix `unnecessary-lambda` false positive for lambdas using its parameters in ↵github-actions[bot]2023-03-281-0/+8
| | | | | | | | | their body (#8498) (#8506) Fixes #8496 (cherry picked from commit b62143611a4713e4729ce9ecb6398f5f94d82f1a) Co-authored-by: cherryblossom <31467609+cherryblossom000@users.noreply.github.com>
* Don't consider ``Union`` to always be a type alias (#8489)Daniël van Noord2023-03-231-1/+7
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 07127ee75f3456920ff5117cdbaf8697744b6cfc)
* Use UninferableBase instead of UninferableDaniel van Noord2023-03-071-4/+6
|
* Changing flake8 to have max-line-length of 115 (#8362)Ollie2023-03-021-1/+2
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Prevent emitting ``invalid-name`` on 'global' redefinition (#8337)Mark Byrne2023-02-271-5/+0
| | | | | Closes #8307
* Add ``invalid-name`` check for ``TypeAlias`` names (#7116)Daniël van Noord2023-02-262-20/+52
|
* Fixing some too long lines (#8339)Ollie2023-02-251-1/+4
| | | | | * Changing flake8 max-line-length to 120 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [pre-commit.ci] pre-commit autoupdate (#8208)pre-commit-ci[bot]2023-02-071-1/+0
| | | | | | | | | | updates: - [github.com/PyCQA/autoflake: v2.0.0 → v2.0.1](https://github.com/PyCQA/autoflake/compare/v2.0.0...v2.0.1) - [github.com/charliermarsh/ruff-pre-commit: v0.0.241 → v0.0.243](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.241...v0.0.243) - [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0) * Remove false positive fixed in ruff 0.243 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix a false negative for 'missing-parentheses-for-call-in-test'Pierre Sassoulas2023-02-051-13/+10
| | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Tighten design constraints (#8115)Nick Drozd2023-01-281-0/+1
| | | | | | | | | | | | | * Lower max locals * Lower max statements * Lower max try statements * Lower max branches * Lower max args * Cut design constraints with default values
* Add `consider-refactoring-into-while-condition` checker (#8021)yushao22023-01-271-3/+1
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Update disallowed-name to flag module-level variables (#7808)Dani Alcala2023-01-251-2/+14
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix invalid-name for typing_extensions.TypeVar (#8089)Marc Mueller2023-01-201-2/+7
|
* pointless-exception-statement: filter call inference for better performance ↵James Addison2023-01-201-3/+12
| | | | | | | | | on large codebases (#8078) Filtering to to names that begin with an uppercase character seems to be sufficient, See the full conversation on Github for details. Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Add new check "pointless-exception-statement" (#7939)James Addison2023-01-071-1/+16
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [pre-commit] Upgrade to black 23.1a1 with 2023's formatting (#7965)Pierre Sassoulas2022-12-271-1/+0
|
* Fixes ``method-cache-max-size-none`` false positive (#7908)Dani Alcala2022-12-091-4/+2
| | | | | | | For methods inheriting from ``Enum``. Closes #7857 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix ``dangerous-default-value`` false negative when `*` is used. (#7856)Dani Alcala2022-11-271-1/+1
|
* Fix false positive for 'used-before-assignment' with terminating func (#7784)Dani Alcala2022-11-171-22/+1
|
* Add named-expr-without-context check (#7763)Marc Mueller2022-11-141-2/+13
|
* Detect unreachable code after sys.exit, quit, exit, and os._exit (#7520)Dani Alcala2022-11-131-7/+36
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Use new symbolic name instead of the old names (#7728)Dani Alcala2022-11-071-3/+3
|
* Add `magic-number` checker for comparison with literals (#7526)orSolocate2022-10-221-15/+16
| | | Co-authored-by: Or Bahari <or.bahari@samsung.com>
* Update assert-on-tuple for any populated tuple (#7468)Dani Alcala2022-09-191-7/+3
| | | | Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Turn on ``mypy`` strict mode 🎉 (#7448)Daniël van Noord2022-09-091-1/+1
| | | | | | | | | | * Ignore subclasses of Any * Add ignores for imported code and remove casts * Add disables for uninferable return values * Turn on ``mypy`` strict mode
* Finish some incomplete typing signatures (#7442)Daniël van Noord2022-09-091-1/+4
|
* [literal-comparison] Make the message explicit with the solutionPierre Sassoulas2022-08-251-2/+15
| | | | | | Also update the confidence Closes #5237
* Improve TypeVar name regex (#7322)Marc Mueller2022-08-191-1/+1
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [typing] Add typing to the class checkers (#7190)Pierre Sassoulas2022-08-101-1/+1
| | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* [basic checker] Add the confidence for 'unreachable' (#7216)Pierre Sassoulas2022-07-211-7/+7
|
* Fix false negative for `nonlocal-without-binding`. (#7099)Mark Byrne2022-07-061-2/+7
|
* Add documentation examples for `exec-used` (#7018)Julthep Nandakwang2022-06-251-3/+4
| | | | Co-authored-by: Vladyslav Krylasov <vladyslav.krylasov@gmail.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add `continue-in-finally` documentation examples (#6586)Mark Byrne2022-06-241-1/+5
| | | | | | * Add support for py-version for checker `continue-in-finally`. Co-authored-by: Vladyslav Krylasov <vladyslav.krylasov@gmail.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add whitespace/punctuation to some message descriptions (#7009)Julthep Nandakwang2022-06-232-5/+5
|
* Emit `using-constant-test` when testing truth value of a variable holding a ↵Jacob Walls2022-06-121-2/+39
| | | | generator (#6916)
* Emit `using-constant-test` when testing truth value of a call returning a ↵Jacob Walls2022-06-111-3/+21
| | | | | generator (#6911) Update confidence level to INFERENCE for `using-constant-test` and `missing-parentheses-for-call-in-test`
* Add disable and exclude pylint files in CI (#6814)Daniël van Noord2022-06-031-0/+2
|
* Add typing to ``basic_error_checker`` and ``docstring_checker``Daniël van Noord2022-05-312-21/+29
|
* [refactor] Use a generator for '_has_variadic_argument' (#6770)Pierre Sassoulas2022-05-311-9/+6
|
* Add typing to ``basic_checker``Daniël van Noord2022-05-311-17/+35
|
* Add typing to ``comparison_checker`` (#6694)Daniël van Noord2022-05-251-14/+30
|
* Add typing to ``name_checker`` (#6687)Daniël van Noord2022-05-242-35/+57
|
* Enable line-wrapping from ``pydocstringformatter``Daniël van Noord2022-05-231-2/+5
|
* Some initial line wrapping of docstrings (#6672)Daniël van Noord2022-05-231-1/+3
|
* Update ranges for error messages (#6606)Marc Mueller2022-05-131-3/+3
| | | | * using-constant-test * missing-parentheses-for-call-in-test
* Add `comparison-of-constants` checker (#6413)omarandlorraine2022-05-041-0/+28
| | | | | 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>
* Run development version of ``pydocstringformatter`` (#6469)Daniël van Noord2022-04-281-5/+5
|
* Remove some words from custom dictionary and update spellingDaniël van Noord2022-04-262-2/+2
|