Skip to content

Commit 72ebf36

Browse files
committed
Fix flake8 issues
1 parent 9ece3e2 commit 72ebf36

File tree

5 files changed

+22
-58
lines changed

5 files changed

+22
-58
lines changed

src/schema.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

tests/test_complexity_visitor.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_one_field_simple_complexity_calculation():
1717
query = """
1818
query Something {
1919
a1ComplexityField
20-
}
20+
}
2121
"""
2222

2323
complexity = _evaluate_complexity(query)
@@ -30,7 +30,7 @@ def test_two_fields_simple_complexity_calculation():
3030
query Something {
3131
a1ComplexityField
3232
alias: a1ComplexityField
33-
}
33+
}
3434
"""
3535

3636
complexity = _evaluate_complexity(query)
@@ -51,7 +51,7 @@ def test_complexity_visitor_respects_graphql_result_data():
5151
aStr
5252
anInt
5353
}
54-
}
54+
}
5555
"""
5656

5757
complexity = _evaluate_complexity(query)
@@ -72,7 +72,7 @@ def test_complexity_with_a_complex_query():
7272
aStr
7373
anInt
7474
}
75-
}
75+
}
7676
"""
7777

7878
complexity = _evaluate_complexity(query, SimpleEstimator(0, 0))
@@ -89,7 +89,7 @@ def test_complexity_works_with_multiple_operation_definitions():
8989
query SomethingElse {
9090
a1ComplexityField
9191
alias: a1ComplexityField
92-
}
92+
}
9393
"""
9494

9595
complexity = _evaluate_complexity(query)
@@ -162,7 +162,7 @@ def test_7():
162162
query = """
163163
query Something {
164164
aFieldWithArgs (anArg: "input")
165-
}
165+
}
166166
"""
167167

168168
complexity = _evaluate_complexity(query)
@@ -174,7 +174,7 @@ def test_8():
174174
query = """
175175
query Something {
176176
anNComplexityField
177-
}
177+
}
178178
"""
179179

180180
complexity = _evaluate_complexity(query)

tests/test_directives_estimator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ def test_simple_query_with_directive_estimator():
2020
schema = """directive @complexity(
2121
# The complexity value for the field
2222
value: Int!
23-
23+
2424
# Optional multipliers
2525
multipliers: [String!]
2626
) on FIELD_DEFINITION
27-
27+
2828
type Query {
2929
# Fixed complexity of 5
3030
someField: String @complexity(value: 5)
@@ -34,7 +34,7 @@ def test_simple_query_with_directive_estimator():
3434
query = """
3535
query Something {
3636
someField
37-
}
37+
}
3838
"""
3939

4040
complexity = _evaluate_complexity_with_directives_estimator(query, schema)

tests/test_simple_estimator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_root_fields_do_not_multiply():
1919
query = """
2020
query Something {
2121
a_field
22-
}
22+
}
2323
"""
2424

2525
complexity = _evaluate_complexity_with_simple_estimator(query, 3, 10)
@@ -32,7 +32,7 @@ def test_root_fields_complexity_is_added():
3232
query Something {
3333
a_field
3434
another_field
35-
}
35+
}
3636
"""
3737

3838
complexity = _evaluate_complexity_with_simple_estimator(query, 5, 1)
@@ -47,7 +47,7 @@ def test_complexity_multiplies_with_objects():
4747
a_field
4848
another_field
4949
}
50-
}
50+
}
5151
"""
5252

5353
complexity = _evaluate_complexity_with_simple_estimator(query, 1, 10)
@@ -63,7 +63,7 @@ def test_complexity_multiplies_two_levels():
6363
a_field
6464
}
6565
}
66-
}
66+
}
6767
"""
6868

6969
complexity = _evaluate_complexity_with_simple_estimator(query, 1, 10)
@@ -80,7 +80,7 @@ def test_complexity_multiplies_with_depth():
8080
}
8181
another_field
8282
}
83-
}
83+
}
8484
"""
8585

8686
complexity = _evaluate_complexity_with_simple_estimator(query, 1, 10)

tests/test_strawberry_extension.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_one_field_simple_complexity_calculation():
5757
query = """
5858
query Something {
5959
a1ComplexityField
60-
}
60+
}
6161
"""
6262

6363
result = _execute_with_complexity(query)
@@ -70,7 +70,7 @@ def test_two_fields_simple_complexity_calculation():
7070
query Something {
7171
a1ComplexityField
7272
alias: a1ComplexityField
73-
}
73+
}
7474
"""
7575

7676
result = _execute_with_complexity(query)
@@ -91,7 +91,7 @@ def test_complexity_visitor_respects_graphql_result_data():
9191
aStr
9292
anInt
9393
}
94-
}
94+
}
9595
"""
9696

9797
result = _execute_with_complexity(query)
@@ -122,7 +122,7 @@ def test_complexity_with_a_complex_query():
122122
aStr
123123
anInt
124124
}
125-
}
125+
}
126126
"""
127127

128128
result = _execute_with_complexity(query, SimpleEstimator(0, 0))
@@ -139,7 +139,7 @@ def test_complexity_works_with_multiple_operation_definitions():
139139
query SomethingElse {
140140
a1ComplexityField
141141
alias: a1ComplexityField
142-
}
142+
}
143143
"""
144144

145145
result = _execute_with_complexity(query)
@@ -200,7 +200,6 @@ def test_complexity_handles_fragments_definition_after_operation_definition():
200200
aStr
201201
anInt
202202
}
203-
204203
"""
205204

206205
result = _execute_with_complexity(query)
@@ -212,7 +211,7 @@ def test_7():
212211
query = """
213212
query Something {
214213
aFieldWithArgs (anArg: "input")
215-
}
214+
}
216215
"""
217216

218217
result = _execute_with_complexity(query)
@@ -224,7 +223,7 @@ def test_8():
224223
query = """
225224
query Something {
226225
anNComplexityField
227-
}
226+
}
228227
"""
229228

230229
result = _execute_with_complexity(query)

0 commit comments

Comments
 (0)