Skip to content

Commit

Permalink
rm backslash in f strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Jul 10, 2024
1 parent d3f1499 commit dedde72
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/bidspm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,23 @@
SUPPORTED_ACTIONS = set(ALLOWED_ACTIONS) - NOT_IMPLEMENTED

Check warning on line 25 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L25

Added line #L25 was not covered by tests


ul_it = "\n\t- "

Check warning on line 28 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L28

Added line #L28 was not covered by tests


def validate_actions(action: str) -> None:

Check warning on line 31 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L31

Added line #L31 was not covered by tests
if action not in ALLOWED_ACTIONS:
log.error(

Check warning on line 33 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L33

Added line #L33 was not covered by tests
f"\nUnknown action: '{action}'."
f"\nSupported actions are: \n\t- {'\n\t- '.join(SUPPORTED_ACTIONS)}"
f"Unknown action: '{action}'."
"\nSupported actions are:"
f"{ul_it}{ul_it.join(SUPPORTED_ACTIONS)}"
)
raise SystemExit(EXIT_CODES["USAGE"]["Value"])

Check warning on line 38 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L38

Added line #L38 was not covered by tests

if action in NOT_IMPLEMENTED:
log.error(

Check warning on line 41 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L41

Added line #L41 was not covered by tests
f"\tThe action '{action}' is not yet implemented."
f"\nSupported actions are: \n\t- {'\n\t- '.join(SUPPORTED_ACTIONS)}"
f"The action '{action}' is not yet implemented."
"\nSupported actions are:"
f"{ul_it}{ul_it.join(SUPPORTED_ACTIONS)}"
)
raise SystemExit(EXIT_CODES["USAGE"]["Value"])

Check warning on line 46 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L46

Added line #L46 was not covered by tests

Expand Down Expand Up @@ -74,11 +79,11 @@ def cli(argv: Any = sys.argv) -> None:
validate_actions(action)

Check warning on line 79 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L79

Added line #L79 was not covered by tests

if not bids_dir.is_dir():
log.error(f"The 'bids_dir' does not exist:\n\t{bids_dir}")
log.error("The 'bids_dir' does not exist:\n\t" f"{bids_dir}")
exit(EXIT_CODES["NOINPUT"]["Value"])

Check warning on line 83 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L82-L83

Added lines #L82 - L83 were not covered by tests

if preproc_dir is not None and not preproc_dir.is_dir():
log.error(f"The 'preproc_dir' does not exist:\n\t{preproc_dir}")
log.error("The 'preproc_dir' does not exist:\n\t" f"{preproc_dir}")
exit(EXIT_CODES["NOINPUT"]["Value"])

Check warning on line 87 in src/bidspm/cli.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/cli.py#L86-L87

Added lines #L86 - L87 were not covered by tests

if action in {"stats", "contrasts", "results"}:
Expand Down

0 comments on commit dedde72

Please sign in to comment.