use cast() to clarify some type checker complaints
This commit is contained in:
		
							parent
							
								
									93471a221c
								
							
						
					
					
						commit
						fcb470a02c
					
				@ -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,
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user