Context builder misses class arguments if first one is a declaration without an accompanying expression
How to Reproduce
class MyClass:
a: int
b: int = 10
def __init__(self): pass
Gives a class without field b, only field a is present.
The constructor is also ignored.
Conversely, if we do:
class MyClass:
def __init__(self): pass
b: int = 10
a: int
Then we have both a and b.
Expected behavior
In the first situation, we should also have both field a and b and the constructor should be checked.
Additional context
This does appear to be a bug with the underling python-parser-0.1.0.
If a class starts with an Assignment, then no further statements are given and/or parsed.
Description of Bug
Context builder misses class arguments if first one is a declaration without an accompanying expression
How to Reproduce
Gives a class without field
b
, only fielda
is present. The constructor is also ignored.Conversely, if we do:
Then we have both
a
andb
.Expected behavior
In the first situation, we should also have both field
a
andb
and the constructor should be checked.Additional context
This does appear to be a bug with the underling
python-parser-0.1.0
. If a class starts with anAssignment
, then no further statements are given and/or parsed.