Skip to content
Commit d324e78c authored by Francis Herne's avatar Francis Herne
Browse files

Shorten class context range by one line.

Class contexts behave in some ways (tooltips, completion) as if they're
 one line longer than they ought to be:
```
a = 2
class M:
  a = "text"
b = a # tooltip of `a` says 'str', should be 'int'
a # 'int'
```
Expression-visitor doesn't have that problem, i.e. `b` is 'int' in the
 example above.

Shortening the class context range by one line fixes tooltips, uses and
 completions, and doesn't seem to break the expression visitor.

Test case "class_scope_end_outside" is fixed by this patch, the others
 are unchanged.

BUG: 309817
parent 1344f00a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment