Partial type hints fix

This commit is contained in:
Dmytry Lavrov 2025-09-28 13:11:23 -05:00
parent 6b8409ab33
commit 4ffec78728

View file

@ -1705,9 +1705,12 @@ class Location:
@overload
def __mul__(self, other: Iterable[Location]) -> list[Location]: ...
@overload
def __mul__(self, other: Iterable[Shape]) -> list[Shape]: ...
def __mul__(
self, other: Shape | Location | Iterable[Location | Shape | Iterable]
) -> Shape | Location | list[Location | Shape | list]:
) -> Shape | Location | list[Location] | list[Shape]:
"""Combine locations"""
if self.wrapped is None:
raise ValueError("Cannot move a shape at an empty location")