Python: Autoformat Variables/*

This commit is contained in:
Rasmus Wriedt Larsen
2019-12-20 15:08:20 +01:00
parent 25ab0ed20f
commit b8a9a353b8
17 changed files with 231 additions and 260 deletions

View File

@@ -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
)
}