Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
maede97 committed Oct 19, 2024
1 parent a96fc0a commit 16c49a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from automatic_walk_time_tables.utils.error import UserException
from automatic_walk_time_tables.utils.gpx_creator import (
create_gpx_file,
fetch_data_for_uuid
fetch_data_for_uuid,
)
from automatic_walk_time_tables.utils.path import Path, path_from_json
from automatic_walk_time_tables.utils.point import Point_LV95
Expand Down
2 changes: 1 addition & 1 deletion backend/automatic_walk_time_tables/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def __create_files(self):
)

def store_gpx_file(self, name: str):
gpx_data = gpx_creator.create_gpx_file(self.__path, self.__way_points)
gpx_data = gpx_creator.create_gpx_file(self.__path, self.__way_points)
with open(f"{name}.gpx", "w") as wr:
wr.write(gpx_data)

Expand Down
19 changes: 10 additions & 9 deletions backend/automatic_walk_time_tables/utils/gpx_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def fetch_data_for_uuid(uuid):

return None


def create_gpx_file(_path: path.Path, _way_points: path.Path):
"""
Create a GPX file from a path and waypoints.
Expand Down Expand Up @@ -169,15 +170,15 @@ def add_waypoints(_path: path.Path, _way_points: path.Path, gpx_f: GPX):
gpx_extension_waypoint_stage_before.attrib["distance"] = "{:.6f}".format(
distance - accumulated_distance
)
gpx_extension_waypoint_stage_before.attrib["duration"] = (
"0" # calculated by the app
)
gpx_extension_waypoint_stage_before.attrib["ascent"] = (
"0" # calculated by the app
)
gpx_extension_waypoint_stage_before.attrib["descent"] = (
"0" # calculated by the app
)
gpx_extension_waypoint_stage_before.attrib[
"duration"
] = "0" # calculated by the app
gpx_extension_waypoint_stage_before.attrib[
"ascent"
] = "0" # calculated by the app
gpx_extension_waypoint_stage_before.attrib[
"descent"
] = "0" # calculated by the app
accumulated_distance = distance

wp = gpxpy.gpx.GPXWaypoint(lat, lon, elevation=elevation, name=name)
Expand Down

0 comments on commit 16c49a9

Please sign in to comment.