Files
codeql/python/ql/test/library-tests/descriptors/Descriptors.ql
Taus Brock-Nannestad f07a7bf8cf Python: Autoformat everything using qlformat.
Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
2020-07-07 15:43:52 +02:00

10 lines
308 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