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 Nov 20, 2023
1 parent 7d69948 commit 5ac4efb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
6 changes: 3 additions & 3 deletions examples/docs/04_metrics_and_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
"\n",
" def run(self):\n",
" self.my_metric.write_text(\n",
" json.dumps(\n",
" {\"metric_1\": 17 * self.pre_factor, \"metric_2\": 42 * self.pre_factor}\n",
" )\n",
" json.dumps({\n",
" \"metric_1\": 17 * self.pre_factor, \"metric_2\": 42 * self.pre_factor\n",
" })\n",
" )\n",
"\n",
" x_data = np.linspace(0, 1.0 * self.pre_factor, 1000)\n",
Expand Down
26 changes: 12 additions & 14 deletions tests/integration/function_wrapper/test_single_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@ def test_example_func(proj_path):

def test_example_func_dry_run(proj_path):
script = example_func(dry_run=True)
assert " ".join(script) == " ".join(
[
"stage",
"add",
"-n",
"example_func",
"--force",
"--params",
"params.yaml:example_func",
"--outs",
"test.txt",
"zntrack run test_single_function.example_func",
]
)
assert " ".join(script) == " ".join([
"stage",
"add",
"-n",
"example_func",
"--force",
"--params",
"params.yaml:example_func",
"--outs",
"test.txt",
"zntrack run test_single_function.example_func",
])


@zntrack.nodify(outs=[pathlib.Path("test.txt")], params={"text": "Lorem Ipsum"})
Expand Down
1 change: 1 addition & 0 deletions zntrack/exceptions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""All ZnTrack exceptions."""


class NodeNotAvailableError(Exception):
"""Raised when a node is not available."""

Expand Down

0 comments on commit 5ac4efb

Please sign in to comment.