Files
codeql/python/ql/test/library-tests/descriptors/Descriptors.ql
2018-11-19 15:15:54 +00:00

13 lines
310 B
Plaintext

import python
from ClassObject cls, string kind
where cls.isDescriptorType() and
/* Exclude bound-method as its name differs between 2 and 3 */
not cls = theBoundMethodType() and
(if cls.isOverridingDescriptorType() then
kind = "overriding"
else
kind = "non-overriding"
)
select cls.toString(), kind