@@ -82,10 +82,10 @@ def semantic_analysis_for_scc(graph: 'Graph', scc: List[str], errors: Errors) ->
8282 # We use patch callbacks to fix up things when we expect relatively few
8383 # callbacks to be required.
8484 apply_semantic_analyzer_patches (patches )
85- # This pass might need fallbacks calculated above.
86- check_type_arguments (graph , scc , errors )
8785 # Run class decorator hooks (they requite complete MROs and no placeholders).
8886 apply_class_plugin_hooks (graph , scc , errors )
87+ # This pass might need fallbacks calculated above and the results of hooks.
88+ check_type_arguments (graph , scc , errors )
8989 calculate_class_properties (graph , scc , errors )
9090 check_blockers (graph , scc )
9191 # Clean-up builtins, so that TypeVar etc. are not accessible without importing.
@@ -133,10 +133,9 @@ def semantic_analysis_for_targets(
133133 process_top_level_function (analyzer , state , state .id ,
134134 n .node .fullname , n .node , n .active_typeinfo , patches )
135135 apply_semantic_analyzer_patches (patches )
136-
136+ apply_class_plugin_hooks ( graph , [ state . id ], state . manager . errors )
137137 check_type_arguments_in_targets (nodes , state , state .manager .errors )
138138 calculate_class_properties (graph , [state .id ], state .manager .errors )
139- apply_class_plugin_hooks (graph , [state .id ], state .manager .errors )
140139
141140
142141def restore_saved_attrs (saved_attrs : SavedAttributes ) -> None :
0 commit comments