Skip to content

Commit 80367db

Browse files
Lint the site packages in CI and fix what it found
1 parent 06910be commit 80367db

8 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
python-version: "3.13"
2020
- run: pip install -r requirements-dev.txt
21-
- run: flake8 codespeed
21+
- run: flake8 codespeed speed_python speed_pypy
2222

2323
test:
2424
runs-on: ubuntu-latest

‎codespeed/templates/codespeed/changes_data.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<td>{% if rev.get_browsing_url %}<a href="{{ rev.get_browsing_url }}">{{ rev.commitid }}</a>{% else %}{{ rev.commitid }}{% endif %}</td>
2424
</tr>
2525
<tr class="date"><th class="infofirst">Date</td><td>{{ rev.date }}</td></tr>
26-
{% if rev.branch.project.repo_type != "N" %}
26+
{% if rev.branch.project.repo_type != "N" %}
2727
<tr class="repo-path"><th class="infofirst">Repo</th><td>{{ rev.branch.project.repo_path }}</td></tr>
2828
{% endif %}
2929
</tbody>

‎codespeed/templates/codespeed/changes_table.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{% endif%}{% if units.has_stddev %}<td>{{ units.totals.min }}</td>
2222
{% endif%}{% if units.hasmax %}<td>{{ units.totals.max }}</td>
2323
{% endif%}<td>{{ units.totals.change|percentage }}</td>
24-
<td>{% if units.totals.trend != "-" %}{{ units.totals.trend|floatformat:2 }}%{% else %}{{ units.totals.trend }}{% endif %}</td>
24+
<td>{% if units.totals.trend != "-" %}{{ units.totals.trend|floatformat:2 }}%{% else %}{{ units.totals.trend }}{% endif %}</td>
2525
</tr>
2626
</tfoot>
2727
<tbody>

‎codespeed/templates/codespeed/timeline.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</div>
8181

8282
<div id="configbar">
83-
<span class="options">
83+
<span class="options" title="Last {{ defaultlast }} revisions tested">
8484
Show the last
8585
<select id="revisions">{% for rev in lastrevisions %}
8686
<option value="{{ rev }}">{{ rev }}</option>{% endfor %}

‎speed_pypy/wsgi.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This is used for staging & production
22
import os
3-
import sys
43

54
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "speed_pypy.settings")
65

7-
from django.core.wsgi import get_wsgi_application
6+
from django.core.wsgi import get_wsgi_application # noqa: E402
87
application = get_wsgi_application()

‎speed_python/client.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def save_to_speedcenter(url=None, project=None, commitid=None, executable=None,
7777
parser.add_option("--benchmark")
7878
parser.add_option("--commitid")
7979
parser.add_option("--environment",
80-
help="Use a custom Codespeed environment")
80+
help="Use a custom Codespeed environment")
8181
parser.add_option("--executable")
8282
parser.add_option("--max", type="float")
8383
parser.add_option("--min", type="float")
@@ -88,7 +88,8 @@ def save_to_speedcenter(url=None, project=None, commitid=None, executable=None,
8888
parser.add_option("--revision_date")
8989
parser.add_option("--std-dev", type="float")
9090
parser.add_option("--url",
91-
help="URL of your Codespeed server (e.g. http://codespeed.example.org)")
91+
help="URL of your Codespeed server "
92+
"(e.g. http://codespeed.example.org)")
9293

9394
(options, args) = parser.parse_args()
9495

@@ -117,6 +118,6 @@ def save_to_speedcenter(url=None, project=None, commitid=None, executable=None,
117118
try:
118119
save_to_speedcenter(**kwargs)
119120
sys.exit(0)
120-
except StandardError, e:
121+
except Exception as e:
121122
logging.error("Error saving results: %s", e)
122123
sys.exit(1)

‎speed_python/tests.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Tests for the speed.python.org specific views.
22
3-
Run with: python manage.py test codespeed speed_python --settings=codespeed.tests.settings
3+
Run with:
4+
python manage.py test codespeed speed_python --settings=codespeed.tests.settings
45
"""
56
import json
67
import os

‎speed_python/wsgi.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This is used for staging & production
22
import os
3-
import sys
43

54
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "speed_python.settings")
65

7-
from django.core.wsgi import get_wsgi_application
6+
from django.core.wsgi import get_wsgi_application # noqa: E402
87
application = get_wsgi_application()

0 commit comments

Comments
 (0)