Skip to content

Commit 9f18fa8

Browse files
committed
Fix linting
1 parent 1683af0 commit 9f18fa8

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

WeatherRoutingTool/constraints/constraints.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class Constraint:
2828
"""
29-
Main class for handling of constraints. Constraints implemented so far:
29+
Main class for handling of constraints. Constraints implemented so far:
3030
LandCrossing (prohibit land crossing), WaterDepth (prohibit crossing of areas with too low water depth),
3131
StayOnMap (prohibit leaving the area for which the weather data has been obtained)
3232
"""
@@ -214,7 +214,7 @@ class ConstraintsList:
214214
"""
215215
List of constraints. During the routing procedure, you can check for ConstraintList.safe_crossing(lat_start,
216216
lat_end, lon_start, lon_end, time) which looks for constraints in between starting point and destination.
217-
Alternatively it can also be checked for a single point whether a constraint is hit via
217+
Alternatively it can also be checked for a single point whether a constraint is hit via
218218
ConstraintList.safe_endpoint(lat, lon, time).
219219
"""
220220

@@ -591,7 +591,7 @@ def load_data_ODC(self, depth_path, product_name, measurements=None):
591591
:raises KeyError: measurement in measurements is not known on ODC
592592
:return: Depth data loaded from ODC
593593
:rtype: xarray.Dataset
594-
"""
594+
"""
595595
logger.info(form.get_log_step('Obtaining depth data from ODC', 0))
596596

597597
dc = datacube.Datacube()
@@ -646,7 +646,7 @@ def load_data_automatic(self, depth_path):
646646

647647
def load_data_from_file(self, depth_path):
648648
"""
649-
Load depth data from given file
649+
Load depth data from given file
650650
651651
:param depth_path: Path to the depth data
652652
:type depth_path: str
@@ -804,15 +804,15 @@ class ContinuousCheck(NegativeContraint):
804804
for the continuous check in the negative constraints
805805
"""
806806

807-
host : str
808-
database : str
809-
user : str
810-
password : str
811-
port : str # returns values from .env to be passed in the engine of the db
807+
host: str
808+
database: str
809+
user: str
810+
password: str
811+
port: str # returns values from .env to be passed in the engine of the db
812812

813-
predicates : list # Possible spatial relations to be tested when considering the constraints
813+
predicates: list # Possible spatial relations to be tested when considering the constraints
814814

815-
tags : list # Values of the seamark tags that need to be considered
815+
tags: list # Values of the seamark tags that need to be considered
816816

817817
engine: sqlalchemy.engine
818818

@@ -891,15 +891,15 @@ class SeamarkCrossing(ContinuousCheck):
891891
for the continuous check in the negative constraints
892892
"""
893893

894-
host : str
895-
database : str
896-
user : str
897-
password : str
898-
port : str # returns values from .env to be passed in the engine of the db
894+
host: str
895+
database: str
896+
user: str
897+
password: str
898+
port: str # returns values from .env to be passed in the engine of the db
899899

900-
predicates : list # Possible spatial relations to be tested when considering the constraints
900+
predicates: list # Possible spatial relations to be tested when considering the constraints
901901

902-
tags : list # Values of the seamark tags that need to be considered
902+
tags: list # Values of the seamark tags that need to be considered
903903

904904
concat_tree: STRtree
905905

WeatherRoutingTool/constraints/route_postprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def calculate_angle_of_current_crossing(self, start_node, end_node, separation_l
684684
slope_route = self.calculate_slope(start_node.x, start_node.y, end_node.x, end_node.y)
685685
for line in separation_lane_gdf.geom:
686686
for i in range(len(line.coords) - 1):
687-
separation_lane_segment = LineString( [line.coords[i], line.coords[i + 1]])
687+
separation_lane_segment = LineString([line.coords[i], line.coords[i + 1]])
688688
if separation_lane_segment.intersects(intersecting_route_seg_geom):
689689
point_x, point_y = separation_lane_segment.xy
690690
slope_separation_lane = self.calculate_slope(point_x[0], point_y[0], point_x[1], point_y[1])

0 commit comments

Comments
 (0)