No reproducer, because nothing is user-visible (that's kinda the point).
On every run, parse_classes fills ReportClass.incomplete_attributes by walking each class's MRO, with cross-module get_class_fields lookups and an annotation check of every method. build_module_report then drops all of it. The only thing a class contributes to the report is
{"kind": "class", "name": "Child", "n_typable": 0, "n_typed": 0, "n_any": 0, "n_untyped": 0, "location": {"line": 4, "column": 1}}
and no pyrefly coverage check error reads it either. So the whole MRO analysis unnecessarily bloats memory (partially contributing to #3989, not sure by how much though).
Deleting it looks better than serializing it, because the data is, well, plain wrong. The inherited-field check uses ClassFieldProperties::is_annotated (hardcoded as false for MethodLike fields) so every inherited method is recorded as incomplete no matter how fully it is annotated.
No reproducer, because nothing is user-visible (that's kinda the point).
On every run,
parse_classesfillsReportClass.incomplete_attributesby walking each class's MRO, with cross-moduleget_class_fieldslookups and an annotation check of every method.build_module_reportthen drops all of it. The only thing a class contributes to the report is{"kind": "class", "name": "Child", "n_typable": 0, "n_typed": 0, "n_any": 0, "n_untyped": 0, "location": {"line": 4, "column": 1}}and no
pyrefly coverage checkerror reads it either. So the whole MRO analysis unnecessarily bloats memory (partially contributing to #3989, not sure by how much though).Deleting it looks better than serializing it, because the data is, well, plain wrong. The inherited-field check uses
ClassFieldProperties::is_annotated(hardcoded asfalseforMethodLikefields) so every inherited method is recorded as incomplete no matter how fully it is annotated.