Skip to content

Commit

Permalink
style: run ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
merydian committed Jan 8, 2024
1 parent aff06b6 commit 714d8be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions ORStools/gui/ORStoolsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ def __init__(self, iface, parent=None):
self.routing_fromline_list.model().rowsMoved.connect(self._reindex_list_items)
self.routing_fromline_list.model().rowsRemoved.connect(self._reindex_list_items)


# Recalculate elevation profile when vertex list changes
self.routing_fromline_list.model().rowsMoved.connect(self.update_elevation_profile)
self.routing_fromline_list.model().rowsRemoved.connect(self.update_elevation_profile)
Expand All @@ -473,7 +472,7 @@ def update_elevation_profile(self):
Elevation(self).make_image()

def toggle_elevation_profile(self):
if not self.routing_fromline_list.count() in [0, 1]:
if self.routing_fromline_list.count() not in [0, 1]:
self.label_elevation_profile.setVisible(self.checkBox_elevation_profile.isChecked())
else:
if self.checkBox_elevation_profile.isChecked():
Expand Down
7 changes: 3 additions & 4 deletions ORStools/utils/elevation.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def base(self):
if self.dlg.routing_fromline_list.count() in [0, 1]:
return


# if no API key is present, when ORS is selected, throw an error message
if not provider["key"] and provider["base_url"].startswith(
"https://api.openrouteservice.org"
Expand All @@ -98,10 +97,10 @@ def base(self):
params = directions.get_parameters()
if self.dlg.optimization_group.isChecked():
QMessageBox.warning(
self.dlg,
self.dlg,
"Not available:",
"Elevation profile not available for optimization",
)
"Elevation profile not available for optimization",
)
return
else:
params["coordinates"] = directions.get_request_line_feature()
Expand Down

0 comments on commit 714d8be

Please sign in to comment.