Skip to content

Commit

Permalink
fix(typing): Resolve mypy error
Browse files Browse the repository at this point in the history
tools\schemapi\utils.py:494: error: Incompatible types in assignment (expression has type "Generator[str, None, None]", variable has type "chain[str]")  [assignment]
  • Loading branch information
dangotbanned committed Oct 23, 2024
1 parent d9d1585 commit 4714865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/schemapi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def to_type_repr( # noqa: C901
tp_str = TypeAliasTracer.add_literal(self, tp_str, replace=True)
tps.add(tp_str)
elif FOR_TYPE_HINTS and self.is_union_literal():
it = chain.from_iterable(el.literal for el in self.anyOf)
it: Iterator[str] = chain.from_iterable(el.literal for el in self.anyOf)
tp_str = TypeAliasTracer.add_literal(self, spell_literal(it), replace=True)
tps.add(tp_str)
elif self.is_anyOf():
Expand Down

0 comments on commit 4714865

Please sign in to comment.