use cast() to clarify some type checker complaints
This commit is contained in:
parent
bbdf6b877d
commit
8d4a6a8867
@ -542,7 +542,7 @@ class ILibraryView(Mapping[str, 'Pattern'], metaclass=ABCMeta):
|
||||
Return:
|
||||
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(
|
||||
self,
|
||||
|
@ -233,7 +233,7 @@ class Arc(Shape):
|
||||
r0, r1 = self.radii
|
||||
|
||||
# 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user