diff --git a/mypy/newsemanal/semanal.py b/mypy/newsemanal/semanal.py index 576099c5d281..68a815dda66c 100644 --- a/mypy/newsemanal/semanal.py +++ b/mypy/newsemanal/semanal.py @@ -4262,10 +4262,14 @@ def defer(self, debug_context: Optional[Context] = None) -> None: """Defer current analysis target to be analyzed again. This must be called if something in the current target is - incomplete or has a placeholder node. - - This must not be called during the final analysis iteration! - Instead, an error should be generated. + incomplete or has a placeholder node. However, this must *not* + be called during the final analysis iteration! Instead, an error + should be generated. Often 'process_placeholder' is a good + way to either defer or generate an error. + + NOTE: Some methods, such as 'anal_type', 'mark_incomplete' and + 'record_incomplete_ref', call this implicitly, or when needed. + They are usually preferable to a direct defer() call. """ assert not self.final_iteration, 'Must not defer during final iteration' self.deferred = True