Skip to content

Commit 1b5359c

Browse files
committed
Review: Small tweaks & fixes
1 parent aa66f1b commit 1b5359c

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

toolchain/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import signal, getpass, platform, itertools, dataclasses
3+
import signal, getpass, platform, itertools
44

55
from mfc import args, lock, build, bench, state, count
66
from mfc.state import ARG
@@ -21,11 +21,11 @@ def __print_greeting():
2121
MFC_SIDEBAR_LINES = [
2222
f"[bold]{host_line}[/bold]",
2323
'-' * len(host_line),
24-
f"[bold]--jobs [magenta]{ARG('jobs')}[/magenta][/bold]"
25-
] + [
26-
f"[bold]--{'' if getattr(state.gCFG, field.name) else 'no-'}{field.name}[/bold]" for field in dataclasses.fields(state.gCFG)
27-
] + [
24+
'',
25+
f"[bold]--jobs [magenta]{ARG('jobs')}[/magenta][/bold]",
26+
f"[bold]{' '.join(state.gCFG.make_options())}[/bold]",
2827
targets_line if ARG("command") != "test" else "",
28+
'',
2929
'-' * len(help_line),
3030
f"[yellow]{help_line}[/yellow]",
3131
]

toolchain/mfc/common.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
.:-=++++===--==+=-+= +. :=
2323
+#=::::::::=%=. -+: =+ *:
2424
.*=-=*=.. :=+*+: -...--
25-
26-
\
2725
"""
2826

2927

toolchain/mfc/lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .printer import cons
66

77

8-
MFC_LOCK_CURRENT_VERSION: int = 3
8+
MFC_LOCK_CURRENT_VERSION: int = 4
99

1010

1111
@dataclasses.dataclass

toolchain/mfc/state.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def make_options(self) -> typing.List[str]:
2929

3030
def make_slug(self) -> str:
3131
""" Sort the items by key, then join them with underscores. This uniquely
32-
identifies the configuration. Example: no-debug no-gpu no_mpi """
32+
identifies the configuration. Example: no-debug_no-gpu_no_mpi_no-gcov """
3333
return '_'.join([ f"{'no-' if not v else ''}{k}" for k, v in sorted(self.items(), key=lambda x: x[0]) ])
3434

3535
def __eq__(self, other) -> bool:
@@ -41,7 +41,7 @@ def __eq__(self, other) -> bool:
4141
return True
4242

4343
def __str__(self) -> str:
44-
""" Returns a string like "mpi=No & gpu=No & debug=No" & gcov=No """
44+
""" Returns a string like "mpi=No & gpu=No & debug=No & gcov=No" """
4545

4646
return ' & '.join([ f"{k}={'Yes' if v else 'No'}" for k, v in self.items() ])
4747

0 commit comments

Comments
 (0)