gh-132261: Store annotations at hidden internal keys in the class dict (#132345)
This commit is contained in:
@@ -815,7 +815,10 @@ codegen_process_deferred_annotations(compiler *c, location loc)
|
||||
Py_DECREF(conditional_annotation_indices);
|
||||
|
||||
RETURN_IF_ERROR(codegen_leave_annotations_scope(c, loc));
|
||||
RETURN_IF_ERROR(codegen_nameop(c, loc, &_Py_ID(__annotate__), Store));
|
||||
RETURN_IF_ERROR(codegen_nameop(
|
||||
c, loc,
|
||||
ste->ste_type == ClassBlock ? &_Py_ID(__annotate_func__) : &_Py_ID(__annotate__),
|
||||
Store));
|
||||
|
||||
return SUCCESS;
|
||||
error:
|
||||
|
||||
Reference in New Issue
Block a user