Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix `used-before-assignment` false positive for `TYPE_CHECKING` elif branch ↵ | Zen Lee | 2023-03-30 | 1 | -1/+1 |
| | | | | | | imports (#8441) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | [PyCQA migration] Upgrade links to the repositories in code and doc (#8514) | Pierre Sassoulas | 2023-03-29 | 8 | -19/+19 |
| | |||||
* | Fix FP for used-before-assignment with assignment expressions in containers ↵ | Jacob Walls | 2023-02-11 | 2 | -6/+9 |
| | | | | (#8253) | ||||
* | Fix `used-before-assignment` false positive for TYPE_CHECKING if/elif/else ↵ | Zen Lee | 2023-02-07 | 2 | -11/+31 |
| | | | | usage (#8071) | ||||
* | Fix unreleased false positives with `used-before-assignment` (#7921) | Jacob Walls | 2022-12-12 | 1 | -0/+4 |
| | | | | | Cases with NamedExpr and Starred relating to definitions under "always false" conditions added in https://github.com/PyCQA/pylint/pull/6677 | ||||
* | Prevent `used-before-assignment` for variables defined in assignment ↵ | Jacob Walls | 2022-11-25 | 2 | -4/+5 |
| | | | | expressions (#7847) | ||||
* | Emit `used-before-assignment` for variables only defined under always false ↵ | Jacob Walls | 2022-11-22 | 2 | -0/+6 |
| | | | | tests (#6677) | ||||
* | Fix `valid-metaclass-classmethod-first-arg` default value (#7791) | Cubicpath | 2022-11-19 | 1 | -2/+2 |
| | | | | | * Change default value to "mcs" * Fix functional tests to use "mcs" for first MetaClass classmethod arg | ||||
* | Rename `broad-except` and new check `broad-exception-raised` (#7709) | Dani Alcala | 2022-11-05 | 1 | -1/+1 |
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Move `consider-using-augmented-assign` to `CodeStyle` extension (#7628) | Marc Mueller | 2022-10-16 | 1 | -1/+1 |
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Add ``consider-using-augmented-assign`` checker (#7514) | Daniël van Noord | 2022-09-22 | 1 | -1/+1 |
| | | | | Co-authored-by: clavedeluna <danalitovsky+git@gmail.com> Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> | ||||
* | Fix `undefined-loop-variable` with `NoReturn` and `Never` (#7476) | Daniël van Noord | 2022-09-19 | 4 | -4/+43 |
| | | | | Co-authored-by: detachhead <detachhead@users.noreply.github.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> | ||||
* | Fix `used-before-assignment` for functions/classes defined in type checking ↵ | Rogdham | 2022-08-27 | 2 | -9/+18 |
| | | | | | | guard Close #7368 | ||||
* | Fix `undefined-loop-variable` from walrus in comprehension test (#7324) | Jacob Walls | 2022-08-20 | 2 | -0/+10 |
| | |||||
* | fix `undefined-loop-variable` with `break` and `continue` statements in ↵ | DetachHead | 2022-08-19 | 2 | -1/+19 |
| | | | | | | | | | `else` blocks (#7318) Also add better regex explanation for news fragments following hard to fix issue with it. Co-authored-by: detachhead <detachhead@users.noreply.github.com> | ||||
* | Remove Python 2 code from the tests & refactor (#7320) | Mark Byrne | 2022-08-18 | 3 | -52/+50 |
| | | | | | | | - 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 crash when using `enumerate` in a ternary expression (#7132) | Jacob Walls | 2022-07-05 | 2 | -1/+8 |
| | |||||
* | Emit `used-before-assignment` for self-referencing assignments under if ↵ | Jacob Walls | 2022-06-15 | 2 | -0/+6 |
| | | | | conditions (#6958) | ||||
* | Fix ``undefined-variable`` for ``__class__`` in inner methods (#6957) | Daniël van Noord | 2022-06-15 | 2 | -8/+14 |
| | |||||
* | Avoid raising `undefined-loop-variable` twice on same line (#6925) | Jacob Walls | 2022-06-12 | 2 | -0/+9 |
| | |||||
* | Warn about self-referencing named expressions lacking prior assignments (#6915) | Jacob Walls | 2022-06-12 | 2 | -8/+16 |
| | |||||
* | Fix false positive for `undefined-loop-variable` with `enumerate()` (#6602) | Jacob Walls | 2022-05-13 | 1 | -0/+7 |
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Move no-self-use to optional extension (#6448) | Marc Mueller | 2022-05-05 | 2 | -2/+2 |
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | C2901 & C2902: New checks for unnecessary lambda expression usage (#6004) | Joe Young | 2022-05-04 | 3 | -41/+43 |
| | | | | | 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> | ||||
* | Update tests and testoptions for PyPy | Daniël van Noord | 2022-05-03 | 1 | -1/+3 |
| | |||||
* | Fix false positive for `undefined-loop-variable` for lambda in first of two ↵ | Jacob Walls | 2022-05-01 | 1 | -0/+20 |
| | | | | | | loops (#6479) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Fix a false positive for `undefined-loop-variable` when a loop else raises ↵ | Jacob Walls | 2022-05-01 | 1 | -0/+16 |
| | | | | | | or returns (#6480) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Prevent false positive `undefined-variable` for user-specified builtins ↵ | Jacob Walls | 2022-04-19 | 2 | -0/+17 |
| | | | | given type annotations (#6392) | ||||
* | Remove the 'no-init' message tat was not emitted anyway | Pierre Sassoulas | 2022-04-18 | 2 | -2/+2 |
| | | | | | | See https://github.com/PyCQA/pylint/issues/2409#issuecomment-1100952171 Closes #2409 | ||||
* | Fix handling of "for x in x" homonyms (#6154) | Jacob Walls | 2022-04-03 | 2 | -2/+1 |
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Use ``node.position`` in ``add_message`` if available (#5897) | Daniël van Noord | 2022-03-12 | 1 | -3/+3 |
| | |||||
* | Fix #5112: Prevent `used-before-assignment` if named expression found first ↵ | Jacob Walls | 2022-02-17 | 2 | -0/+15 |
| | | | | | in container (#5812) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Fix false positive `used-before-assignment` for named expressions in ternary ↵ | Jacob Walls | 2022-02-02 | 1 | -0/+16 |
| | | | | operators (#5748) | ||||
* | Remove moot TODO (#5747) | Jacob Walls | 2022-01-30 | 2 | -4/+3 |
| | | | Changing the message type occurred in 0fb6a120c6f0fbc94e305542fe29e790274be096 and updating this unit test to match took place in fa2b6ceca796311a918e28770d101b53a43f84f3. | ||||
* | Fix #5399: Fix false negatives for further variable messages for invalid ↵ | Jacob Walls | 2022-01-29 | 2 | -1/+14 |
| | | | | type annotations or default arguments (#5727) | ||||
* | Add confidence level `CONTROL_FLOW` (#5709) | Jacob Walls | 2022-01-26 | 2 | -14/+14 |
| | |||||
* | Fix test conflicts after merging two valid MR incompatible together (#5726) | Jacob Walls | 2022-01-26 | 2 | -4/+4 |
| | | | After f85fb8d975d17f411e5f91ed2d5f21ba999e121e, certain unused type annotations raise `used-before-assignment` rather than `undefined-variable`. The subsequent commit `0fb6a120c6f0fbc94e305542fe29e790274be096` was drafted before the prior change was made, and it addressed a related false negative, so this commit just applies the intended change of message type. | ||||
* | Fix #5713: Emit `used-before-assignment` instead of `undefined-variable` ↵ | Jacob Walls | 2022-01-26 | 2 | -89/+2 |
| | | | | | | when accessing unused type annotations (#5718) * Add confidence level HIGH to `used-before-assignment` | ||||
* | Fix false negative for `undefined-variable` (#5711) | Jacob Walls | 2022-01-26 | 2 | -1/+19 |
| | | | | | | | For unused type annotation after the same name appears multiple times in a comprehension Fix #5654 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Fix #5568: Allow nested classes as return annotations (#5688) | Jacob Walls | 2022-01-16 | 1 | -0/+15 |
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Fix false positive for `unused-variable` for a comprehension variable ↵ | Jacob Walls | 2022-01-10 | 2 | -3/+19 |
| | | | | | | | matching a type annotation (#5651) * Close #5326 | ||||
* | Fix ``used-before-assignment`` for assignment expressions in lambda (#5530) | Daniël van Noord | 2021-12-21 | 1 | -0/+11 |
| | |||||
* | Fix #4761: Emit `used-before-assignment` where single assignment only made ↵ | Jacob Walls | 2021-12-11 | 2 | -2/+4 |
| | | | | | | in except blocks (#5402) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | ||||
* | Move ``TestVariablesChecker`` to functional tests (#5419) | Daniël van Noord | 2021-11-28 | 4 | -0/+58 |
| | |||||
* | Update functional test expected output (#5349) | Daniël van Noord | 2021-11-24 | 4 | -54/+54 |
| | | | | | | * 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> | ||||
* | Add control flow check for ``undefined-variable`` in ``if ... else`` | Daniël van Noord | 2021-10-26 | 2 | -1/+52 |
| | | | | Closes #3688 | ||||
* | Add tests for assignment expressions in function defaults (#5188) | Daniël van Noord | 2021-10-25 | 2 | -1/+36 |
| | | | | | | | | | * 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> | ||||
* | Fix regression for ``_is_only_type_assignment`` (#5163) | Daniël van Noord | 2021-10-23 | 5 | -37/+112 |
| | | | | | | | | | | | | | | | | * 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 ``undefined-variable`` check line numbers of metaclass parameters | Daniël van Noord | 2021-10-18 | 2 | -0/+11 |
| | |||||
* | Add test for #4021 | Daniël van Noord | 2021-10-18 | 2 | -8/+21 |
| | | | | This closes #4021 |