Skip to content

Commit

Permalink
Black and isort changes
Browse files Browse the repository at this point in the history
  • Loading branch information
natelust committed Jun 27, 2023
1 parent 93e3286 commit 498258d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
8 changes: 5 additions & 3 deletions python/lsst/daf/butler/core/datasets/ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,11 @@ def __init__(
if id is not None:
self._id = id.int
else:
self._id = DatasetIdFactory().makeDatasetId(
self.run, self.datasetType, self.dataId, id_generation_mode
).int
self._id = (
DatasetIdFactory()
.makeDatasetId(self.run, self.datasetType, self.dataId, id_generation_mode)
.int
)

@property
def id(self) -> DatasetId:
Expand Down
3 changes: 1 addition & 2 deletions python/lsst/daf/butler/core/persistenceContext.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ class PersistenceContextVars:

@classmethod
def _getContextVars(cls) -> dict[str, ContextVar]:
"""Build a dictionary of names to caches declared at class scope.
"""
"""Build a dictionary of names to caches declared at class scope."""
classAttributes: dict[str, ContextVar] = {}
for k in vars(cls):
v = getattr(cls, k)
Expand Down
8 changes: 3 additions & 5 deletions python/lsst/daf/butler/core/quantum.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

__all__ = ("Quantum", "SerializedQuantum", "DimensionRecordsAccumulator")

from collections.abc import Iterable, Mapping, MutableMapping
from typing import Any
import sys
import warnings
from collections.abc import Iterable, Mapping, MutableMapping
from typing import Any

from lsst.utils import doImportType
from pydantic import BaseModel
Expand Down Expand Up @@ -57,9 +57,7 @@ def _reconstructDatasetRef(
# if the dimension record has been loaded previously use that,
# otherwise load it from the dict of Serialized DimensionRecords
if dimensionRecords is None:
raise ValueError(
"Cannot construct from a SerializedQuantum with no dimension records. "
)
raise ValueError("Cannot construct from a SerializedQuantum with no dimension records. ")
tmpSerialized = dimensionRecords[dId]
reconstructedDim = DimensionRecord.from_simple(tmpSerialized, universe=universe)
records[sys.intern(reconstructedDim.definition.name)] = reconstructedDim
Expand Down

0 comments on commit 498258d

Please sign in to comment.