mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Expand implicit classmethods
This commit is contained in:
@@ -197,7 +197,11 @@ predicate isClassmethod(Function func) {
|
||||
or
|
||||
exists(Class cls |
|
||||
cls.getAMethod() = func and
|
||||
func.getName() = "__new__"
|
||||
func.getName() in [
|
||||
"__new__", // https://docs.python.org/3.10/reference/datamodel.html#object.__new__
|
||||
"__init_subclass__", // https://docs.python.org/3.10/reference/datamodel.html#object.__init_subclass__
|
||||
"__class_getitem__", // https://docs.python.org/3.10/reference/datamodel.html#object.__class_getitem__
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user