Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove return from run method on Runner #424

Merged
merged 3 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion snakebids/bidsapp/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,3 @@ def run(self, args: list[str] | None = None):
self.parse_args(args)
self.pm.hook.run(config=self.config)
self._run = True
return self
3 changes: 3 additions & 0 deletions snakebids/snakemake_compat.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from argparse import ArgumentParser
from pathlib import Path
from types import ModuleType
from typing import Any, Callable, Iterable, Sequence

from snakemake.common import configfile as configfile # type: ignore

configfile: ModuleType

class WildcardError(Exception): ...

def load_configfile(configpath: str) -> dict[str, Any]:
Expand Down
4 changes: 2 additions & 2 deletions snakebids/tests/test_bidsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def test_parse_args(self):

def test_run(self):
app = bidsapp.app(plugins=[self])
app.run(args=["default"])
assert app.run(args=["default"]) is None
assert self.hooks_run == 7
app.run(args=["default"])
assert app.run(args=["default"]) is None
assert self.hooks_run == 7


Expand Down