Skip to content

Commit

Permalink
bump version, add print styling for grouped processes
Browse files Browse the repository at this point in the history
  • Loading branch information
CheeseCake87 committed Sep 7, 2024
1 parent e103a9f commit a10507c
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/pyqwe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
except ImportError:
raise ImportError("pyqwe requires toml, install it with 'pip install toml'")

__version__ = "1.7.1"
__version__ = "1.8.0"

_cwd = Path().cwd()
_known_toml_files = [
Expand Down Expand Up @@ -73,19 +73,26 @@ def main():
for option in pars.options:

try:
if not isinstance(option[1], str):
if type(option[1]) not in [str, list]:
raise InvalidRunner()
except Exception as e:
_ = e
print(f"💥🏎️⁉️ {Colr.FAIL}Invalid runner: {option}{Colr.END}")
print("")
sys.exit(0)

print(
f" {Colr.OKCYAN}{option[0]}{Colr.END} "
f"{Colr.BOLD}=>{Colr.END} "
f"{Colr.HEADER}{option[1]}{Colr.END}"
)
if isinstance(option[1], list):
print(f"{Colr.OKCYAN}{option[0]}{Colr.END} {Colr.BOLD}↩︎{Colr.END} ")
for func in option[1]:
print(
f" {Colr.BOLD}=>{Colr.END} {Colr.HEADER}{func}{Colr.END}"
)
else:
print(
f"{Colr.OKCYAN}{option[0]}{Colr.END} "
f"{Colr.BOLD}=>{Colr.END} "
f"{Colr.HEADER}{option[1]}{Colr.END}"
)

print("")
sys.exit(0)
Expand Down

0 comments on commit a10507c

Please sign in to comment.