mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
Python: Autoformat Variables/*
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import python
|
||||
|
||||
/* Parameters with defaults that are used as an optimization.
|
||||
/*
|
||||
* Parameters with defaults that are used as an optimization.
|
||||
* E.g. def f(x, len=len): ...
|
||||
* (In general, this kind of optimization is not recommended.)
|
||||
*/
|
||||
|
||||
predicate optimizing_parameter(Parameter p) {
|
||||
exists(string name, Name glob |
|
||||
p.getDefault() = glob |
|
||||
glob.getId() = name and
|
||||
exists(string name, Name glob | p.getDefault() = glob |
|
||||
glob.getId() = name and
|
||||
p.asName().getId() = name
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user