You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I am not mistaken, it can be removed right now. No test demonstrate a need for it.
The only use of this information inside mypy (through ClassDef.is_builtinclass) is in nearest_builtin_ancestor(), called from check_multiple_inheritance() in checker.py[1]. Replacing
passes all the tests[2], except the whitebox-test testBuiltinclassDecorator in semanal-classes.test, but this test only verifies that the implementation tracks this information.
[1] It resides on meet.py, for some reason, adding an unnecessary dependency
[2] Otherwise it could be replaced with looking up the decorator. Or keeping a list of builtin classes
Activity
elazarg commentedon Oct 17, 2016
If I am not mistaken, it can be removed right now. No test demonstrate a need for it.
The only use of this information inside mypy (through
ClassDef.is_builtinclass) is innearest_builtin_ancestor(), called fromcheck_multiple_inheritance()inchecker.py[1]. Replacingpasses all the tests[2], except the whitebox-test testBuiltinclassDecorator in
semanal-classes.test, but this test only verifies that the implementation tracks this information.[1] It resides on
meet.py, for some reason, adding an unnecessary dependency[2] Otherwise it could be replaced with looking up the decorator. Or keeping a list of builtin classes
gnprice commentedon Oct 20, 2016
Thanks for investigating! Sounds like a small patch with that cleanup would be great.
Remove support for @builtinclass (#2294)
gvanrossum commentedon Oct 22, 2016
Let's leave this open until it's also removed from typeshed (two lines).