Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 7, 2024
1 parent 712ed09 commit 15c2d60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 6 additions & 3 deletions signac/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand Down
6 changes: 2 additions & 4 deletions signac/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 15c2d60

Please sign in to comment.