Skip to content

Commit 7fd74ee

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 127ac6c commit 7fd74ee

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

bergson/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def run_config(config_path: str, command_registry: dict[str, type]) -> None:
6565
if multi:
6666
# Optional top-level run path for a multi-step pipeline
6767
run_path = config.get("run_path")
68-
68+
6969
save_pipeline_config(steps, run_path)
7070

7171
for i, (cmd_name, cmd) in enumerate(steps, start=1):

bergson/config/config_io.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
from pathlib import Path
66
from typing import Any, Protocol, TypeVar, cast
77

8-
import yaml
98
import petname
9+
import yaml
1010

1111
from bergson.utils.logger import get_logger
1212

13-
1413
CONFIG_FILENAME = "config.yaml"
1514

1615

@@ -84,7 +83,7 @@ def save_pipeline_config(steps: list[tuple[str, Any]], run_path: str | Path | No
8483
8584
It can be run using ``bergson <run_path>/config.yaml``.
8685
87-
The pipeline config uses the same format as one-step command configs, but is saved
86+
The pipeline config uses the same format as one-step command configs, but is saved
8887
to a ``run_path`` directory unique to the pipeline run. ``steps`` is the list of
8988
commands that ran.
9089
"""
@@ -110,7 +109,7 @@ def read_config(path: str | Path) -> dict[str, Any]:
110109
path = _resolve(path)
111110
with path.open() as f:
112111
config = yaml.safe_load(f)
113-
112+
114113
if not isinstance(config, dict) or not isinstance(config.get("steps"), list):
115114
raise ValueError(
116115
f"{path} must be a mapping with a `steps:` list of "
@@ -138,10 +137,10 @@ def load_subconfig(
138137
field: str,
139138
config_cls: type[T],
140139
) -> T | None:
141-
"""Hydrate one configuration dataclass (e.g. ``field="index_cfg",
140+
"""Hydrate one configuration dataclass (e.g. ``field="index_cfg",
142141
config_cls=IndexConfig``) from a ``config.yaml``.
143142
144-
Searches every step for ``field`` and returns the first match
143+
Searches every step for ``field`` and returns the first match
145144
or ``None``.
146145
"""
147146
if not _resolve(path).exists():

0 commit comments

Comments
 (0)