From 98e0b399beb33ed4ec1c5e273638eb7998756d33 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:57:48 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.15.0 → v3.15.2](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.15.2) - [github.com/psf/black: 23.12.1 → 24.3.0](https://github.com/psf/black/compare/23.12.1...24.3.0) - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e8a5def8..12d54050e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: @@ -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 From 3c98a9cba3d355422259de6f6e1f626e5d9958a8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 17:01:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- flow/aggregates.py | 6 +++--- flow/project.py | 36 +++++++++++++++++------------------ flow/scripts/template_test.py | 1 + 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/flow/aggregates.py b/flow/aggregates.py index 2b10a1c26..0a60138f6 100644 --- a/flow/aggregates.py +++ b/flow/aggregates.py @@ -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 diff --git a/flow/project.py b/flow/project.py index 7f8dc6a07..bffcc5560 100644 --- a/flow/project.py +++ b/flow/project.py @@ -1846,9 +1846,9 @@ 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 @@ -1856,16 +1856,16 @@ def _setup_template_environment(self): 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 @@ -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 @@ -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 diff --git a/flow/scripts/template_test.py b/flow/scripts/template_test.py index 2663cb62e..e4332716b 100644 --- a/flow/scripts/template_test.py +++ b/flow/scripts/template_test.py @@ -1,4 +1,5 @@ """Implement the test-workflow flow CLI subcommand.""" + import errno import logging import os