use cast() to clarify some type checker complaints

This commit is contained in:
Jan Petykiewicz 2024-10-05 15:51:09 -07:00
parent c3b281a4f0
commit f7e1e8a9eb
2 changed files with 2 additions and 2 deletions

View File

@ -542,7 +542,7 @@ class ILibraryView(Mapping[str, 'Pattern'], metaclass=ABCMeta):
Return: Return:
Topologically sorted list of pattern names. Topologically sorted list of pattern names.
""" """
return list(TopologicalSorter(self.child_graph()).static_order()) return cast(list[str], list(TopologicalSorter(self.child_graph()).static_order()))
def find_refs_local( def find_refs_local(
self, self,

View File

@ -233,7 +233,7 @@ class Arc(Shape):
r0, r1 = self.radii r0, r1 = self.radii
# Convert from polar angle to ellipse parameter (for [rx*cos(t), ry*sin(t)] representation) # Convert from polar angle to ellipse parameter (for [rx*cos(t), ry*sin(t)] representation)
a_ranges = self._angles_to_parameters() a_ranges = cast(tuple[tuple[float, float], tuple[float, float]], self._angles_to_parameters())
# Approximate perimeter via numerical integration # Approximate perimeter via numerical integration