Skip to content

Commit 06606f1

Browse files
author
kmorin
committed
fix linter errors
1 parent 0228812 commit 06606f1

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

fittrackee/workouts/services/workout_from_file/workout_fit_service.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import logging
2+
import sys
13
from typing import IO, Optional
24

35
import fitdecode
46
import gpxpy.gpx
57
import requests
6-
import logging
7-
import sys
88
from flask import current_app
99

1010
from ...exceptions import WorkoutFileException
@@ -180,16 +180,24 @@ def parse_file(
180180
"error", "error when parsing fit file"
181181
) from e
182182

183-
if gpx_segment.points:
183+
if gpx_segment.points:
184184
gpx_track.segments.append(gpx_segment)
185185

186186
if elevation_needed and current_app.config['OPEN_ELEVATION_API_URL']:
187-
url = str(current_app.config['OPEN_ELEVATION_API_URL']) + '/api/v1/lookup'
187+
url = str(current_app.config['OPEN_ELEVATION_API_URL']) \
188+
+ '/api/v1/lookup'
188189
data = []
189190
for segment in gpx_track.segments:
190191
for point in segment.points:
191-
data.append({'latitude': point.latitude, 'longitude': point.longitude})
192-
elevations = requests.post(url, json = { 'locations': data }, timeout=(3.05, 27))
192+
data.append({
193+
'latitude': point.latitude,
194+
'longitude': point.longitude
195+
})
196+
elevations = requests.post(
197+
url,
198+
json = { 'locations': data },
199+
timeout=(3.05, 27)
200+
)
193201
results = elevations.json().get('results')
194202
index = 0
195203
for segment in gpx_track.segments:

0 commit comments

Comments
 (0)