Skip to content

Commit

Permalink
Update and re-apply pre-commit (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-dupuy committed Oct 6, 2021
1 parent 5e8e4d3 commit 61a1116
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
exclude: iqe/data/plugin_skel
repos:
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.5.0
rev: v2.6.0
hooks:
- id: reorder-python-imports
language_version: python3
- repo: https://github.com/ambv/black
rev: 21.5b1
rev: 21.9b0
hooks:
- id: black
args: [--safe, --quiet, --line-length, "100"]
Expand All @@ -29,12 +29,12 @@ repos:
language_version: python3
args: [--max-line-length, "100", --ignore, "E203, W503"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.16.0
rev: v2.29.0
hooks:
- id: pyupgrade
language_version: python3
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.26.0
rev: v8.0.0-rc.0
hooks:
- id: eslint
additional_dependencies:
Expand Down
6 changes: 3 additions & 3 deletions backend/ibutsu_server/widgets/jenkins_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def _calculate_slope(x_data):
x_avg = sum(x_data) / len(x_data)
y_avg = sum(y_data) / len(y_data)
try:
slope = sum([(x - x_avg) * (y - y_avg) for x, y in zip(x_data, y_data)]) / sum(
[(x - x_avg) ** 2 for x in x_data]
slope = sum((x - x_avg) * (y - y_avg) for x, y in zip(x_data, y_data)) / sum(
(x - x_avg) ** 2 for x in x_data
)
except ZeroDivisionError:
slope = 0
Expand Down Expand Up @@ -74,7 +74,7 @@ def _get_builds(job_name, builds, project=None, additional_filters=None):
builds = [build for build in query.limit(builds)]
min_start_times = [build.min_start_time for build in builds]
if min_start_times:
min_start_time = min([build.min_start_time for build in builds])
min_start_time = min(build.min_start_time for build in builds)
else:
min_start_time = None
return min_start_time, [str(build.build_number) for build in builds]
Expand Down

0 comments on commit 61a1116

Please sign in to comment.