-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancement 💡New feature or requestNew feature or requestreleasedIncluded in a releaseIncluded in a release
Description
Is your feature request related to a problem?
Currently, import aliases are not resolved.
Desired solution
In two places in the code aliases have to be recognized and resolved:
- In the function
safeds_stubgen.api_analyzer._mypy_helpers.mypy_type_to_abstract_typein the part
elif isinstance(mypy_type, mp_types.UnboundType):
return sds_types.NamedType(name=mypy_type.name)
- In the function
safeds_stubgen.api_analyzer._ast_visitor.MyPyAstVisitor.enter_classdefin the part
superclasses = [superclass.fullname for superclass in node.base_type_exprs if hasattr(superclass, "fullname")]
You should first look for a function in the mypy library that can resolve types. If such a function does not exist, you'd have to create one yourself. It's possible that such a function can already be found here: mypy.fixup.lookup_fully_qualified_alias
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancement 💡New feature or requestNew feature or requestreleasedIncluded in a releaseIncluded in a release
Type
Projects
Status
✔️ Done