mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-16 08:30:16 +00:00
Add a BindingKind
for WithItem
variables (#8594)
This commit is contained in:
parent
0ac124acef
commit
346a828db2
5 changed files with 19 additions and 1 deletions
|
@ -432,6 +432,13 @@ pub enum BindingKind<'a> {
|
|||
/// ```
|
||||
LoopVar,
|
||||
|
||||
/// A binding for a with statement variable, like `x` in:
|
||||
/// ```python
|
||||
/// with open('foo.py') as x:
|
||||
/// ...
|
||||
/// ```
|
||||
WithItemVar,
|
||||
|
||||
/// A binding for a global variable, like `x` in:
|
||||
/// ```python
|
||||
/// def foo():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue