Skip to content
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
2 changes: 1 addition & 1 deletion src/dvsim/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from dvsim.launcher.nc import NcLauncher
from dvsim.launcher.sge import SgeLauncher
from dvsim.launcher.slurm import SlurmLauncher
from dvsim.logging import configure_logging, log, LOG_LEVELS
from dvsim.logging import LOG_LEVELS, configure_logging, log
from dvsim.utils import TS_FORMAT, TS_FORMAT_LONG, Timer, rm_path, run_cmd_with_timeout
from dvsim.utils.status_printer import get_status_printer

Expand Down
16 changes: 8 additions & 8 deletions src/dvsim/launcher/sge/qsubopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
jsv(1))""",
)

if prog in ["qrsh"]:
if prog == "qrsh":
self.parser.add_argument(
"-noshell",
action="store_true",
Expand All @@ -1133,7 +1133,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
qrsh -noshell /bin/tcsh -f -c 'echo $HOSTNAME'""",
)

if prog in ["qrsh"]:
if prog == "qrsh":
self.parser.add_argument(
"-nostdin",
action="store_true",
Expand Down Expand Up @@ -1174,7 +1174,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
jsv(1))""",
)

if prog in ["qalter"]:
if prog == "qalter":
self.parser.add_argument(
"-ot",
metavar="override_tickets",
Expand Down Expand Up @@ -1405,7 +1405,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
JSV in jsv(1))""",
)

if prog in ["qsub"]:
if prog == "qsub":
self.parser.add_argument(
"-shell",
choices=yesno,
Expand Down Expand Up @@ -1477,7 +1477,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
jsv(1))""",
)

if prog in ["qsub"]:
if prog == "qsub":
self.parser.add_argument(
"-sync",
choices=yesno,
Expand Down Expand Up @@ -1632,7 +1632,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
when 8 slots are free.""",
)

if prog in ["qsub"]:
if prog == "qsub":
self.parser.add_argument(
"-terse",
action="store_true",
Expand All @@ -1649,7 +1649,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
option above or find more information concerning JSV in jsv(1))""",
)

if prog in ["qalter"]:
if prog == "qalter":
self.parser.add_argument(
"-u",
metavar="username",
Expand Down Expand Up @@ -1834,7 +1834,7 @@ def __init__(self, optstring="", prog="qsub") -> None:
find more information concerning JSV in jsv(1))""",
)

if prog in ["qsh"]:
if prog == "qsh":
self.parser.add_argument(
"xterm_args",
nargs="*",
Expand Down
2 changes: 1 addition & 1 deletion src/dvsim/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from typing import cast

__all__ = (
"configure_logging",
"LOG_LEVELS",
"configure_logging",
)


Expand Down
2 changes: 1 addition & 1 deletion src/dvsim/msg_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, category: str, severity: str, label: str | None = None) -> No
raise RuntimeError(msg)
self.category = category
self.severity = severity
self.label = label if label else f"{category} {severity}s".title()
self.label = label or f"{category} {severity}s".title()
self.signatures = []

def clear(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/dvsim/sim/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def _create_deploy_objects(self) -> None:
)

# GUI mode is only available for Xcelium for the moment.
if (self.gui_debug) and (self.tool not in ["xcelium"]):
if (self.gui_debug) and (self.tool != "xcelium"):
log.error(
"GUI debug mode is only available for Xcelium, please remove "
"--gui_debug / -gd option or switch to Xcelium tool.",
Expand Down
2 changes: 1 addition & 1 deletion src/dvsim/utils/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def repo_root(path: Path) -> Path | None:

def git_commit_hash(path: Path | None = None) -> str:
"""Hash of the current git commit."""
root = repo_root(path=path if path else Path.cwd())
root = repo_root(path=path or Path.cwd())

if root is None:
log.error("no git repo found at %s", root)
Expand Down
Loading