Python: Add missing builtins to API::builtin

We were missing out on `None`, `True`, and `False` as these do not
appear as actual attributes of the `builtins` module in Python 3
(because they are elevated to the status of keywords there)

The simple solution, then, is to just always include them directly.
This commit is contained in:
Taus
2021-04-09 12:02:07 +00:00
committed by GitHub
parent ab58cb3d44
commit affdedd840

View File

@@ -363,7 +363,7 @@ module API {
n.isGlobal() and
n.isLoad() and
name = n.getId() and
name = any(Builtins::Builtin b).getName()
name in [any(Builtins::Builtin b).getName(), "None", "True", "False"]
)
}