Skip to content

Commit c15e7c6

Browse files
committed
Fix mro export
1 parent 95a04d9 commit c15e7c6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mypy/exportjson.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def convert_type_info(self: TypeInfo, cfg: Config) -> Json:
239239
"type_vars": self.type_vars,
240240
"has_param_spec_type": self.has_param_spec_type,
241241
"bases": [convert_type(b) for b in self.bases],
242-
"mro": [c.fullname for c in self.mro],
242+
"mro": self._mro_refs,
243243
"_promote": [convert_type(p) for p in self._promote],
244244
"alt_promote": None if self.alt_promote is None else convert_type(self.alt_promote),
245245
"declared_metaclass": (

test-data/unit/exportjson.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ class C:
8383
"bases": [
8484
"builtins.object"
8585
],
86-
"mro": [],
86+
"mro": [
87+
"main.C",
88+
"builtins.object"
89+
],
8790
"_promote": [],
8891
"alt_promote": null,
8992
"declared_metaclass": null,

0 commit comments

Comments
 (0)