-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
priority-1-normalrefactoringChanging mypy's internalsChanging mypy's internalssemantic-analyzerProblems that happen during semantic analysisProblems that happen during semantic analysistopic-pluginsThe plugin API and ideas for new pluginsThe plugin API and ideas for new plugins
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 FalseThen it can be used like this:
if ctx.api.defer_if_possible():
...
else:
... # probably give some errorMaybe 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority-1-normalrefactoringChanging mypy's internalsChanging mypy's internalssemantic-analyzerProblems that happen during semantic analysisProblems that happen during semantic analysistopic-pluginsThe plugin API and ideas for new pluginsThe plugin API and ideas for new plugins