Skip to content

Commit 82057e2

Browse files
committed
Python: Autoformat tests
I guess these were never considered back when we switched to autoformatting everything.
1 parent 25cb52a commit 82057e2

File tree

49 files changed

+96
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+96
-127
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import python
22

3-
4-
select count(Ellipsis e)
3+
select count(Ellipsis e)
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
21
import python
32

43
from ControlFlowNode p, ControlFlowNode s, string kind, string filename
5-
6-
where p.getASuccessor() = s and
7-
(
4+
where
5+
p.getASuccessor() = s and
6+
(
87
p.getAnExceptionalSuccessor() = s and kind = "exception"
98
or
109
not p.getAnExceptionalSuccessor() = s and kind = "normal"
11-
) and filename = p.getLocation().getFile().getShortName() and
12-
not filename = "__future__.py"
13-
14-
select filename, p.getLocation().getStartLine(), p.toString(), s.getLocation().getStartLine(), s.toString(), kind
10+
) and
11+
filename = p.getLocation().getFile().getShortName() and
12+
not filename = "__future__.py"
13+
select filename, p.getLocation().getStartLine(), p.toString(), s.getLocation().getStartLine(),
14+
s.toString(), kind

python/ql/test/2/extractor-tests/import_depth/test.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ import python
33
from ModuleObject m
44
/* Exclude the builtins module as it has a different name under 2 and 3. */
55
where not m = theBuiltinModuleObject()
6-
select m.toString()
6+
select m.toString()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import python
22

33
from StrConst s
4-
select s, s.getText()
4+
select s, s.getText()
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
/**
2-
* Much of the QL library handling integral values assumes that
3-
* equivalence of the DB entities implies equivalence of the
2+
* Much of the QL library handling integral values assumes that
3+
* equivalence of the DB entities implies equivalence of the
44
* Python object and vice-versa.
5-
* In Python 2, 1L == 1, which can cause problems, so we
6-
* normalise all longs to ints.
5+
* In Python 2, 1L == 1, which can cause problems, so we
6+
* normalise all longs to ints.
77
*/
88

99
import python
1010

1111
from NumericObject n
1212
where
13-
exists(IntegerLiteral i |
14-
i.getLiteralObject() = n |
13+
exists(IntegerLiteral i | i.getLiteralObject() = n |
1514
i.getEnclosingModule().getFile().getShortName() = "test.py"
16-
)
15+
)
1716
select n.toString(), n.repr()

python/ql/test/2/extractor-tests/object_hash/Success.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import python
32

43
where exists(theSysModuleObject())

python/ql/test/2/extractor-tests/syntax_error/Modules.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import python
32

43
from Module m
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import python
22

3-
from SyntaxError s
4-
select s.toString()
3+
from SyntaxError s
4+
select s.toString()
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import python
22

3-
43
from AstNode ast, Location l
54
where ast.getLocation() = l
6-
select ast.getAQlClass(), l.getStartLine(), l.getStartColumn(), l.getEndLine(), l.getEndColumn()
5+
select ast.getAQlClass(), l.getStartLine(), l.getStartColumn(), l.getEndLine(), l.getEndColumn()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import python
2+
23
from Module m
34
select m.toString()

0 commit comments

Comments
 (0)