Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#837)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.15.0 → v3.15.2](asottile/pyupgrade@v3.15.0...v3.15.2)
- [github.com/psf/black: 23.12.1 → 24.3.0](psf/black@23.12.1...24.3.0)
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Apr 3, 2024
1 parent a3de17d commit 3d70def
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: trailing-whitespace
- id: debug-statements
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.15.0'
rev: 'v3.15.2'
hooks:
- id: pyupgrade
args:
Expand All @@ -21,11 +21,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: '23.12.1'
rev: '24.3.0'
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: '6.1.0'
rev: '7.0.0'
hooks:
- id: flake8
- repo: https://github.com/PyCQA/pydocstyle
Expand Down
6 changes: 3 additions & 3 deletions flow/aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ def _register_aggregates(self):
except TypeError: # aggregate is not iterable
raise ValueError("Invalid aggregator_function provided by the user.")
# Store aggregate by id to allow searching by id
self._aggregates_by_id[
get_aggregate_id(stored_aggregate)
] = stored_aggregate
self._aggregates_by_id[get_aggregate_id(stored_aggregate)] = (
stored_aggregate
)

def _generate_aggregates(self):
jobs = self._project
Expand Down
36 changes: 18 additions & 18 deletions flow/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1846,26 +1846,26 @@ def _setup_template_environment(self):
)

# Setup standard filters that can be used to format context variables.
template_environment.filters[
"format_timedelta"
] = template_filters.format_timedelta
template_environment.filters["format_timedelta"] = (
template_filters.format_timedelta
)
template_environment.filters["format_memory"] = template_filters.format_memory
template_environment.filters["identical"] = template_filters.identical
template_environment.filters["with_np_offset"] = template_filters.with_np_offset
template_environment.filters["calc_tasks"] = template_filters.calc_tasks
template_environment.filters["calc_num_nodes"] = template_filters.calc_num_nodes
template_environment.filters["calc_walltime"] = template_filters.calc_walltime
template_environment.filters["calc_memory"] = template_filters.calc_memory
template_environment.filters[
"check_utilization"
] = template_filters.check_utilization
template_environment.filters[
"homogeneous_openmp_mpi_config"
] = template_filters.homogeneous_openmp_mpi_config
template_environment.filters["check_utilization"] = (
template_filters.check_utilization
)
template_environment.filters["homogeneous_openmp_mpi_config"] = (
template_filters.homogeneous_openmp_mpi_config
)
template_environment.filters["get_config_value"] = flow_config.get_config_value
template_environment.filters[
"get_account_name"
] = template_filters.get_account_name
template_environment.filters["get_account_name"] = (
template_filters.get_account_name
)
template_environment.filters["print_warning"] = template_filters.print_warning
template_environment.filters["quote_argument"] = shlex.quote

Expand Down Expand Up @@ -3238,9 +3238,9 @@ def dotted_get(mapping, key):
status_legend = " ".join(f"[{v}]:{k}" for k, v in self.ALIASES.items())
context["jobs"] = list(statuses.values())
context["total_num_jobs_or_aggregates"] = total_num_jobs_or_aggregates
context[
"total_num_eligible_jobs_or_aggregates"
] = total_num_eligible_jobs_or_aggregates
context["total_num_eligible_jobs_or_aggregates"] = (
total_num_eligible_jobs_or_aggregates
)
context["total_num_job_labels"] = len(job_labels)
context["overview"] = overview
context["detailed"] = detailed
Expand Down Expand Up @@ -4736,9 +4736,9 @@ def _register_groups(self):
else:
entry.group_aggregator = aggregator.groupsof()
if entry.group_aggregator not in created_aggregate_stores:
created_aggregate_stores[
entry.group_aggregator
] = entry.group_aggregator._create_AggregateStore(self)
created_aggregate_stores[entry.group_aggregator] = (
entry.group_aggregator._create_AggregateStore(self)
)
# Associate the group with its aggregate store
self._group_to_aggregate_store[group] = created_aggregate_stores[
entry.group_aggregator
Expand Down
1 change: 1 addition & 0 deletions flow/scripts/template_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Implement the test-workflow flow CLI subcommand."""

import errno
import logging
import os
Expand Down

0 comments on commit 3d70def

Please sign in to comment.