mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
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:
@@ -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"]
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user