Skip to content

Commit b70c544

Browse files
committed
Fix remaining flake8 warnings except for a few ignored for now
1 parent 7424778 commit b70c544

File tree

23 files changed

+122
-165
lines changed

23 files changed

+122
-165
lines changed

djangobench/benchmarks/multi_value_dict/benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
from djangobench.utils import run_comparison_benchmark
66

7-
case = {'a': ['a'], 'b': ['a','b'], 'c':['a','b','c']}
8-
update = {'a': ['a'], 'b': ['a','b'], 'c':['a','b','c']}
7+
case = {'a': ['a'], 'b': ['a', 'b'], 'c': ['a', 'b', 'c']}
8+
update = {'a': ['a'], 'b': ['a', 'b'], 'c': ['a', 'b', 'c']}
99

1010
def benchmark_multi():
1111
# Instantiate a new MultiValueDict and call key method (i.e. that do

djangobench/benchmarks/query_all/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def setup():
99
global Book
1010
from query_all.models import Book
1111
for i in range(0, 3000):
12-
Book(pk=i,title='foobar_%s' % i ).save()
12+
Book(pk=i, title='foobar_%s' % i).save()
1313

1414
run_benchmark(
1515
benchmark,

djangobench/benchmarks/query_all_converters/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ def setup():
1515
benchmark,
1616
setup=setup,
1717
meta={
18-
'description': 'A simple Model.objects.iterator() call for large number of objects and large number of fields.',
18+
'description': 'Model.objects.iterator() for a large number of objects and large number of fields.',
1919
}
2020
)

djangobench/benchmarks/query_all_multifield/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def setup():
1818
benchmark,
1919
setup=setup,
2020
meta={
21-
'description': 'A simple Model.objects.iterator() call for large number of objects and large number of fields.',
21+
'description': 'A simple Model.objects.iterator() for a large number of objects and large number of fields.',
2222
}
2323
)

djangobench/benchmarks/query_exists/benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ def setup():
99

1010
def benchmark():
1111
global Book
12-
#Checking for object that exists
12+
# Checking for object that exists
1313
Book.objects.filter(id=1).exists()
1414

15-
#Checking for object that does not exist
15+
# Checking for object that does not exist
1616
Book.objects.filter(id=11).exists()
1717

1818
if hasattr(Manager, 'exists'):

djangobench/benchmarks/query_get_or_create/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def benchmark():
1414

1515
# This will do a create ...
1616
Book.objects.get_or_create(id=nextid, defaults={'title': 'hi'})
17-
17+
1818
# ... and this a get.
1919
Book.objects.get_or_create(id=nextid, defaults={'title': 'hi'})
2020

djangobench/benchmarks/template_compilation/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
def benchmark():
77
# Just compile the template, no rendering
8-
t = Template("""
8+
Template("""
99
{% for v in vals %}
1010
{{ v }}
1111
{{ v }}

djangobench/benchmarks/template_render/benchmark.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from djangobench.utils import run_benchmark
55

6-
#set up some vars
76
objects1 = [object(), object(), object(), object(), object()]
87
objects2 = [object(), object(), object(), object(), object()]
98
object1 = object()
@@ -23,8 +22,8 @@ def benchmark_django_lte_13():
2322
'object1': object1,
2423
'object2': object2,
2524
'object3': object3,
26-
'num1' : num1,
27-
'num2' : num2,
25+
'num1': num1,
26+
'num2': num2,
2827
'boolean1': boolean1,
2928
'SCRIPT_CONTENT_URL': SCRIPT_CONTENT_URL,
3029
'WEBSITE_DOMAIN': WEBSITE_DOMAIN,
@@ -39,8 +38,8 @@ def benchmark_django_gt_13():
3938
'object1': object1,
4039
'object2': object2,
4140
'object3': object3,
42-
'num1' : num1,
43-
'num2' : num2,
41+
'num1': num1,
42+
'num2': num2,
4443
'boolean1': boolean1,
4544
'SCRIPT_CONTENT_URL': SCRIPT_CONTENT_URL,
4645
'WEBSITE_DOMAIN': WEBSITE_DOMAIN,

djangobench/benchmarks/template_render/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#some dummy classes for the url reverse
1+
# some dummy classes for the url reverse
22
def join(request):
33
pass
44

djangobench/benchmarks/template_render_simple/benchmark.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55

66
def benchmark():
7-
context = template.Context({
8-
'stuff': 'something'
9-
});
7+
context = template.Context({'stuff': 'something'})
108
t = template.Template('{{ stuff }}')
119
t.render(context)
1210

0 commit comments

Comments
 (0)