Skip to content

Commit

Permalink
Fixing an infinite recursion bug and codecov fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Masara committed Aug 18, 2024
1 parent 98f92c8 commit 812cfbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/safeds_stubgen/api_analyzer/_ast_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,8 +1146,8 @@ def mypy_type_to_abstract_type(

return sds_types.FinalType(type_=sds_types.LiteralType(literals=all_literals))

logging.warning("Final type has no type arguments.")
return sds_types.FinalType(type_=sds_types.UnknownType())
logging.warning("Final type has no type arguments.") # pragma: no cover
return sds_types.FinalType(type_=sds_types.UnknownType()) # pragma: no cover
return sds_types.FinalType(type_=sds_types.UnionType(types=types))
elif unanalyzed_type_name in {"list", "set"}:
type_args = getattr(mypy_type, "args", [])
Expand Down
4 changes: 4 additions & 0 deletions src/safeds_stubgen/stubs_generator/_stub_string_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,10 @@ def _create_internal_class_string(
already_defined_names = already_defined_names.union(existing_names)

for superclass_superclass in superclass_class.superclasses:
if superclass_superclass == superclass: # pragma: no cover
# If the class somehow has itself as a superclass
continue

name = superclass_superclass.split(".")[-1]
if is_internal(name):
superclass_methods_text += self._create_internal_class_string(
Expand Down

0 comments on commit 812cfbe

Please sign in to comment.