summaryrefslogtreecommitdiff
path: root/pylint/checkers/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Drop support for Python 3.7 (#8609)Marc Mueller2023-04-241-1/+1
| | | | | * Drop support for Python 3.7 * Update py-version + classifier * Update functional tests
* Fix `FunctionDef` isinstance checks (#8607)Marc Mueller2023-04-231-2/+3
|
* Cache `class_is_abstract()`Jacob Walls2023-04-231-0/+2
| | | | | For one project in the pylint primer (music21), provides 15% speedup linting the entire project.
* Handle patterns in ignored-modules when checking for no-name-in-module (#7579)Daniel Mouritzen2023-04-031-27/+19
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Jared Proffitt <jaredproffitt@gmail.com>
* [cleanup] Upgrade more doc following the PyCQA migrationPierre Sassoulas2023-03-311-1/+1
|
* Fix `used-before-assignment` false positive for `TYPE_CHECKING` elif branch ↵Zen Lee2023-03-301-47/+0
| | | | | | imports (#8441) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* [PyCQA migration] Upgrade links to the repositories in code and doc (#8514)Pierre Sassoulas2023-03-291-2/+2
|
* [deprecation] Remove duplicated utils typing guards check (#8475)Pierre Sassoulas2023-03-221-43/+0
|
* [ruff] Add RUF specific rules and autofix (#8449)Pierre Sassoulas2023-03-141-1/+1
|
* [cyclic-import] Break cycle between pylint.checkers.util / variables (#8448)Pierre Sassoulas2023-03-141-3/+20
|
* Deprecate redundant type checking guard utils (#8433)Jacob Walls2023-03-121-0/+16
|
* Fix a crash when `TYPE_CHECKING` is used without importing it (#8435)Jacob Walls2023-03-111-1/+4
|
* Clear LRU caches on pylint utilities (#8420)Jacob Walls2023-03-101-1/+20
|
* Remove deprecated functions and classes (#8409)Daniël van Noord2023-03-091-52/+0
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Use UninferableBase instead of UninferableDaniel van Noord2023-03-071-10/+9
|
* Changing flake8 to have max-line-length of 115 (#8362)Ollie2023-03-021-1/+3
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Minor refactor to 'is_defined' (#8243)Zen Lee2023-02-081-7/+5
|
* Fix `used-before-assignment` false positive for TYPE_CHECKING if/elif/else ↵Zen Lee2023-02-071-0/+49
| | | | usage (#8071)
* Tighten design constraints (#8115)Nick Drozd2023-01-281-0/+4
| | | | | | | | | | | | | * 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-0/+56
| | | | | 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>
* Fix `consider-using-augmented-assign` nested attribute access (#8088)Marc Mueller2023-01-201-17/+1
|
* Better regex for private attribute check (#8081)Marc Mueller2023-01-191-1/+1
|
* [consider-using-augmented-assign] Do not warn for non-commutative operators ↵Pierre Sassoulas2023-01-091-1/+6
| | | | | | | | | | | (#8037) Or rather, only warn for known commutative operators. Closes #7639 Co-authored-by: Nick Drozd <nicholasdrozd@gmail.com> Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* class attrs should not emit assigning-non-slot msg (#7987)Dani Alcala2022-12-301-0/+8
|
* Fix `use-sequence-for-iteration` when unpacking a set with `*` (#7975)Dani Alcala2022-12-261-0/+14
|
* Fixes ``method-cache-max-size-none`` false positive (#7908)Dani Alcala2022-12-091-0/+4
| | | | | | | For methods inheriting from ``Enum``. Closes #7857 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Cut oldstyle checksNick Drozd2022-11-301-6/+1
|
* Define Protocol as abstract to prevent abstract-method FP (#7839)Dani Alcala2022-11-301-4/+17
|
* Create `TERMINATING_FUNCS_QNAMES` (#7825)Dani Alcala2022-11-221-3/+8
|
* Fix false positive for 'used-before-assignment' with terminating func (#7784)Dani Alcala2022-11-171-0/+21
|
* Fix false negatives for-any-all (#7707)Dani Alcala2022-11-171-2/+11
|
* Bump mypy from 0.982 to 0.990 (#7769)dependabot[bot]2022-11-141-1/+1
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Fix false positive for ``unhashable-member`` when subclassing ``dict``. (#7757)Mark Byrne2022-11-141-1/+1
| | | | | Closes #7501 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix a false negative for ``unused-import`` (#7678)Mark Byrne2022-11-091-5/+8
| | | | | | | | | | | * 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
* [flake8-bugbear] Do not use 'assert False' but raise 'AssertionError()'Pierre Sassoulas2022-11-051-1/+1
| | | | As the former can be removed by interpreter optimisation.
* @singledispatch and @singledispatchmethod checks for methods and functions ↵Ramon Saraiva2022-10-311-3/+44
| | | | | | (#7575) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add `magic-number` checker for comparison with literals (#7526)orSolocate2022-10-221-0/+8
| | | Co-authored-by: Or Bahari <or.bahari@samsung.com>
* Fix a false positive for `simplify-boolean-expression` when multiple values ↵Jacob Walls2022-10-161-1/+14
| | | | | inferred (#7627) Add a keyword-only `compare_constants` argument to `safe_infer`.
* Refactor check for ignored modules into reusable function (#7604)Daniel Mouritzen2022-10-111-0/+36
|
* Add ``consider-using-augmented-assign`` checker (#7514)Daniël van Noord2022-09-221-0/+65
| | | | Co-authored-by: clavedeluna <danalitovsky+git@gmail.com> Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
* Use stacklevel=2 in warnings.warn calls to DeprecationWarning where makes ↵Yilei "Dolee" Yang2022-09-151-0/+3
| | | | | | | | sense. (#7465) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix `unhashable-member` crash when `lambda` used as a dict key (#7454)Jacob Walls2022-09-121-0/+2
|
* Turn on ``mypy`` strict mode 🎉 (#7448)Daniël van Noord2022-09-091-10/+10
| | | | | | | | | | * 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-4/+4
|
* Emit `used-before-assignment` when function arguments are redefined inside ↵Jacob Walls2022-09-041-0/+8
| | | | an inner function
* Fix #3299 false positives with names in string literal type annotations (#7400)Levi Gruspe2022-09-041-0/+22
| | | | | 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
* Check for ``contextlib.suppress`` in ``node_ignores_exception`` (#7327)Daniël van Noord2022-08-221-5/+58
|
* Fix typing of most inference callsDaniël van Noord2022-07-131-5/+6
|
* Partial typing of ``imports.py`` (#6982)Daniël van Noord2022-07-131-1/+2
|
* Add partial typing to ``class_checker`` (#7088)Daniël van Noord2022-07-071-2/+2
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>