mirror of
https://github.com/github/codeql.git
synced 2026-01-16 07:54:52 +01:00
+ Extend PropertyInternal.getSetter to handle non-decorator + Add PropertyInternal.getDeleter It seems like a bit hacky way to do things, since we're not using the PropertySetterOrDeleter class at all, but for now I'll leave it be.
12 lines
331 B
Plaintext
12 lines
331 B
Plaintext
import python
|
|
import semmle.python.types.Descriptors
|
|
|
|
from PropertyValue p, string method_name, FunctionValue method
|
|
where
|
|
method_name = "getter" and method = p.getGetter()
|
|
or
|
|
method_name = "setter" and method = p.getSetter()
|
|
or
|
|
method_name = "deleter" and method = p.getDeleter()
|
|
select method, method_name, p
|