Skip to content

Commit

Permalink
Update black formatter (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper authored Apr 16, 2024
1 parent efc0a19 commit 1c86107
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build~=0.1.0
black~=22.0
black~=24.3
flake8~=5.0
flake8-bugbear~=22.9
isort~=5.7
Expand Down
6 changes: 3 additions & 3 deletions storey/drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,9 @@ def _build_simplified_feature_store_request(self, aggregation_element):
f"{aggregation_value.default_value})"
)
if array_time_attribute_name not in times_update_expressions:
times_update_expressions[
array_time_attribute_name
] = f"{array_time_attribute_name}={expected_time_expr}"
times_update_expressions[array_time_attribute_name] = (
f"{array_time_attribute_name}={expected_time_expr}"
)
new_cached_times[name] = (
array_time_attribute_name,
expected_time,
Expand Down
8 changes: 4 additions & 4 deletions storey/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ def __init__(
self.period_millis = explicit_windows.period_millis
self._window_start_time = explicit_windows.get_window_start_time_by_time(base_time)
if self._precalculated_aggregations:
for (window_millis, _) in explicit_windows.windows:
for window_millis, _ in explicit_windows.windows:
for aggr in self._all_raw_aggregates:
self._current_aggregate_values[(aggr, window_millis)] = AggregationValue.new_from_name(
aggr, max_value
Expand Down Expand Up @@ -1673,7 +1673,7 @@ def get_features(self, timestamp):
else:
# In case our pre aggregates already have the answer
for aggregation_name in self._explicit_raw_aggregations:
for (window_millis, window_str) in self.explicit_windows.windows:
for window_millis, window_str in self.explicit_windows.windows:
value = self._current_aggregate_values[(aggregation_name, window_millis)].value
count_value = self._current_aggregate_values[("count", window_millis)].value
if value == math.inf or value == -math.inf:
Expand All @@ -1691,7 +1691,7 @@ def augment_virtual_features(self, features):

args = [None, None, None] # Avoid in-loop allocation
for aggregate in self._virtual_aggregations:
for (window_millis, window_str) in self.explicit_windows.windows:
for window_millis, window_str in self.explicit_windows.windows:
for i, aggr in enumerate(aggregate.dependant_aggregates):
args[i] = self._current_aggregate_values[(aggr, window_millis)].value
features[f"{self.name}_{aggregate.name}_{window_str}"] = aggregate.aggregation_func(args)
Expand All @@ -1710,7 +1710,7 @@ def calculate_features(self, timestamp):
for aggregation_name in self._all_raw_aggregates:
self._intermediate_aggregation_values[aggregation_name].reset()
prev_windows_millis = 0
for (window_millis, window_string) in self.explicit_windows.windows:
for window_millis, window_string in self.explicit_windows.windows:
# In case the current bucket is outside our time range just create a feature with the current aggregated
# value
if current_time_bucket_index < 0:
Expand Down

0 comments on commit 1c86107

Please sign in to comment.