Closed
Description
This idea appeared in #6724. It will be useful for plugins and in general to have something like this in SemanticAnalyzer
:
def defer_if_possible(self) -> bool:
if not self.final_iteration:
self.defer()
return True
return False
Then it can be used like this:
if ctx.api.defer_if_possible():
...
else:
... # probably give some error
Maybe we can also add it to the old analyzer as always returning False
, then we can completely hide the old vs new analyzer details in plugin API.