-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
bugSomething isn't workingSomething isn't workingtype-inferenceRequires more advanced type inference.Requires more advanced type inference.
Description
Summary
https://play.ruff.rs/f2c7c8a3-1e38-425f-b1e5-0068e6f8b67b
class Test:
items_list = []
def method(self):
for item in self.items_list:
raise Exception(item)
t = Test()
t.method()This code returns None.
However, autofix substitutes in method NoReturn
from typing import NoReturn
class Test:
items_list = []
def method(self) -> NoReturn:
for item in self.items_list:
raise Exception(item)
t = Test()
t.method()Version
0.14.10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtype-inferenceRequires more advanced type inference.Requires more advanced type inference.