mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-10-31 20:08:19 +00:00 
			
		
		
		
	
		
			
				
	
	
	
	
		
			357 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			357 B
		
	
	
	
	
	
	
	
Iterators
Yield must be iterable
class NotIterable: ...
class Iterator:
    def __next__(self) -> int:
        return 42
class Iterable:
    def __iter__(self) -> Iterator:
        return Iterator()
def generator_function():
    yield from Iterable()
    yield from NotIterable()  # error: "Object of type `NotIterable` is not iterable"
