Skip to content

Commit 1ec5067

Browse files
committed
Lint fixes
This follows our other changes that moved to Black 22.1 and Flake8 4
1 parent 190bf80 commit 1ec5067

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

partitionmanager/database_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def get_position_of_table(database, table, map_data):
13-
""" Returns a Position of the table at the current moment. """
13+
"""Returns a Position of the table at the current moment."""
1414

1515
pos_list = pm_tap.get_current_positions(database, table, map_data["range_cols"])
1616

@@ -21,7 +21,7 @@ def get_position_of_table(database, table, map_data):
2121

2222

2323
def calculate_exact_timestamp_via_query(database, table, position_partition):
24-
""" Calculates the exact timestamp of a PositionPartition.
24+
"""Calculates the exact timestamp of a PositionPartition.
2525
2626
raises ValueError if the position is incalculable
2727
"""

partitionmanager/dropper.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
def _drop_statement(table, partition_list):
12-
""" Generate an ALTER TABLE statement to drop these partitions. """
12+
"""Generate an ALTER TABLE statement to drop these partitions."""
1313

1414
log = logging.getLogger("get_droppable_partitions")
1515

@@ -54,11 +54,15 @@ def get_droppable_partitions(
5454

5555
assert isinstance(next_partition, partitionmanager.types.PositionPartition)
5656

57-
start_time = partitionmanager.database_helpers.calculate_exact_timestamp_via_query(
58-
database, table, partition
57+
start_time = (
58+
partitionmanager.database_helpers.calculate_exact_timestamp_via_query(
59+
database, table, partition
60+
)
5961
)
60-
end_time = partitionmanager.database_helpers.calculate_exact_timestamp_via_query(
61-
database, table, next_partition
62+
end_time = (
63+
partitionmanager.database_helpers.calculate_exact_timestamp_via_query(
64+
database, table, next_partition
65+
)
6266
)
6367

6468
approx_size = 0

partitionmanager/table_append_partition.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,10 @@ def _get_rate_partitions_with_queried_timestamps(
425425
instant_partitions = list()
426426

427427
for partition in partition_list:
428-
exact_time = partitionmanager.database_helpers.calculate_exact_timestamp_via_query(
429-
database, table, partition
428+
exact_time = (
429+
partitionmanager.database_helpers.calculate_exact_timestamp_via_query(
430+
database, table, partition
431+
)
430432
)
431433

432434
instant_partitions.append(

0 commit comments

Comments
 (0)