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.
This commit is contained in:
Taus Brock-Nannestad
2020-07-07 15:43:52 +02:00
parent 993506d781
commit f07a7bf8cf
602 changed files with 26777 additions and 26790 deletions

View File

@@ -2,13 +2,13 @@ import python
from ClassValue cls, string description
where
cls = ClassValue::bool() and description = "bool"
or
cls = ClassValue::int_() and description = "int"
or
cls = ClassValue::float_() and description = "float"
or
cls = ClassValue::classmethod() and description = "classmethod"
or
cls = ClassValue::bool().getMro().getItem(2) and description = "object"
cls = ClassValue::bool() and description = "bool"
or
cls = ClassValue::int_() and description = "int"
or
cls = ClassValue::float_() and description = "float"
or
cls = ClassValue::classmethod() and description = "classmethod"
or
cls = ClassValue::bool().getMro().getItem(2) and description = "object"
select cls, description

View File

@@ -2,15 +2,15 @@ import python
from string txt, Value val
where
exists(string s |
txt = "u'" + s + "'" and val = Value::forUnicode(s)
or
txt = "b'" + s + "'" and val = Value::forBytes(s)
|
s = "a" or s = "b" or s = "c" or s = "d"
)
exists(string s |
txt = "u'" + s + "'" and val = Value::forUnicode(s)
or
exists(int i | txt = i.toString() and val = Value::forInt(i) |
i in [1 .. 10] or i in [1000 .. 1010]
)
txt = "b'" + s + "'" and val = Value::forBytes(s)
|
s = "a" or s = "b" or s = "c" or s = "d"
)
or
exists(int i | txt = i.toString() and val = Value::forInt(i) |
i in [1 .. 10] or i in [1000 .. 1010]
)
select txt, val

View File

@@ -2,14 +2,14 @@ import python
from FunctionValue v, string name
where
name = v.getQualifiedName() and
(
v = Value::named("len")
or
v instanceof PythonFunctionValue
or
v = Value::named("sys.exit")
or
v = Value::named("list").(ClassValue).lookup("append")
)
name = v.getQualifiedName() and
(
v = Value::named("len")
or
v instanceof PythonFunctionValue
or
v = Value::named("sys.exit")
or
v = Value::named("list").(ClassValue).lookup("append")
)
select v, name

View File

@@ -2,12 +2,12 @@ import python
from Value val, string name
where
val = Value::named(name) and
(
name = "bool" or
name = "sys" or
name = "sys.argv" or
name = "ValueError" or
name = "slice"
)
val = Value::named(name) and
(
name = "bool" or
name = "sys" or
name = "sys.argv" or
name = "ValueError" or
name = "slice"
)
select val, name