Skip to content

Commit

Permalink
b1 - hotfix broken compile command
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Nov 13, 2023
1 parent b69a218 commit 4ad2d32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bsb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
install the `bsb` package instead.
"""

__version__ = "4.0.0b0"
__version__ = "4.0.0b1"

import functools

Expand Down
10 changes: 5 additions & 5 deletions bsb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def _get_linked_config(storage=None):
return None


def _bad_flag(flag: bool):
return flag is not None and bool(flag) is not flag


class Scaffold:
"""
Expand Down Expand Up @@ -346,11 +350,7 @@ def compile(
c_strats = self.get_connectivity(skip=skip, only=only)
todo_list_str = ", ".join(s.name for s in itertools.chain(p_strats, c_strats))
report(f"Compiling the following strategies: {todo_list_str}", level=2)
if (
bool(clear) is not clear
or bool(redo) is not redo
or bool(append) is not append
):
if _bad_flag(clear) or _bad_flag(redo) or _bad_flag(append):
raise InputError(
"`clear`, `redo` and `append` are strictly boolean flags. "
"Pass the strategies to run to the skip/only options instead."
Expand Down

0 comments on commit 4ad2d32

Please sign in to comment.