From 15c2d60e4bbfa9ceb136052f4a14b0535771aea6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:57:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- signac/job.py | 9 ++++++--- signac/project.py | 6 ++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/signac/job.py b/signac/job.py index 0ed404f40..6b8d1fd62 100644 --- a/signac/job.py +++ b/signac/job.py @@ -11,8 +11,8 @@ import shutil from copy import deepcopy from threading import RLock -from typing import FrozenSet from types import MappingProxyType +from typing import FrozenSet from synced_collections.backends.collection_json import ( BufferedJSONAttrDict, @@ -474,7 +474,8 @@ def statepoint(self): if self._statepoint_mapping is None: # Load state point data lazily (on access). self._statepoint = _StatePointDict( - jobs=[self], filename=self._statepoint_filename, + jobs=[self], + filename=self._statepoint_filename, ) statepoint = self._statepoint.load(self.id) @@ -483,7 +484,9 @@ def statepoint(self): else: # Create _StatePointDict lazily with a known statepoint dict. self._statepoint = _StatePointDict( - jobs=[self], filename=self._statepoint_filename, data=self._statepoint_mapping + jobs=[self], + filename=self._statepoint_filename, + data=self._statepoint_mapping, ) self._statepoint_requires_init = False diff --git a/signac/project.py b/signac/project.py index 03f8b4079..406bc6d03 100644 --- a/signac/project.py +++ b/signac/project.py @@ -14,8 +14,8 @@ import warnings from collections import defaultdict from collections.abc import Iterable -from copy import deepcopy from contextlib import contextmanager +from copy import deepcopy from datetime import timedelta from itertools import groupby from multiprocessing.pool import ThreadPool @@ -1780,9 +1780,7 @@ def __contains__(self, job): def __iter__(self): # Code duplication here for improved performance. - return _JobsCursorIterator( - self._project, self._ids - ) + return _JobsCursorIterator(self._project, self._ids) def groupby(self, key=None, default=None): """Group jobs according to one or more state point or document parameters.