Files
codeql/python/ql/test/3/library-tests/parameters/Special.ql
Rasmus Wriedt Larsen 0cc8d49112 Python: Add tests for full Python 3 parameters syntax
Currently keyword-only parameters are not handled properly :(
2020-04-27 17:22:56 +02:00

11 lines
229 B
Plaintext

import python
from Parameter p, string type
where
p.isKwargs() and type = "kwargs"
or
p.isVarargs() and type = "varargs"
or
not p.isKwargs() and not p.isVarargs() and type = "normal"
select p.getName(), type