In the types.py for python client, I find there is a reportUndefinedVariable warning.
It is because in Python, when a class is nested inside another class, its full name includes the enclosing class (e.g., Types.NullType). If you omit the enclosing class (Types), the type checker (e.g., Pylance) cannot resolve the type correctly, leading to the reportUndefinedVariable warning.
How should we improve?
Add the Types. as a header to update the type variables in the types.py
Example: replace the _instance: "NullType" = None to _instance: Types.NullType = None.
What would you like to be improved?
In the types.py for python client, I find there is a reportUndefinedVariable warning.
It is because in Python, when a class is nested inside another class, its full name includes the enclosing class (e.g., Types.NullType). If you omit the enclosing class (Types), the type checker (e.g., Pylance) cannot resolve the type correctly, leading to the reportUndefinedVariable warning.
How should we improve?
Add the
Types.
as a header to update the type variables in the types.py Example: replace the_instance: "NullType" = None
to_instance: Types.NullType = None
.related issue
https://github.com/apache/gravitino/issues/5200