Skip to content

Commit

Permalink
fix pyright switch nits
Browse files Browse the repository at this point in the history
  • Loading branch information
vighneshiyer committed Mar 13, 2024
1 parent 93088e7 commit 9f1043d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hammer/sim/vcs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def run_simulation(self) -> bool:
stime: Optional[TimeValue] = None
if saif_mode == "time":
assert saif_start_time
stime = TimeValue(saif_start_time[0])
stime = TimeValue(saif_start_time)
find_regs_run_tcl.append("run {start}ns".format(start=stime.value_in_units("ns")))
elif saif_mode == "trigger_raw":
find_regs_run_tcl.append(saif_start_trigger_raw)
Expand Down Expand Up @@ -299,7 +299,7 @@ def run_simulation(self) -> bool:
stime: Optional[TimeValue] = None
if saif_mode == "time":
assert saif_start_time
stime = TimeValue(saif_start_time[0])
stime = TimeValue(saif_start_time)
find_regs_run_tcl.append("run {start}ns".format(start=stime.value_in_units("ns")))
elif saif_mode == "trigger_raw":
find_regs_run_tcl.append(saif_start_trigger_raw)
Expand Down
2 changes: 2 additions & 0 deletions hammer/technology/asap7/gds_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# This is called by a tech hook that should be inserted post write_design

import sys, glob, os, re
from typing import Any

def main():
assert len(sys.argv) == 3, 'Must have 2 arguments: 1) Path to list of standard cells, 2) Path to GDS file'
Expand All @@ -26,6 +27,7 @@ def main():
# load the standard cell list
cell_list = [line.rstrip() for line in open(stdcells, 'r')]

gds_lib: Any = None
if gds_tool.__name__ == 'gdstk':
# load original_gds
gds_lib = gds_tool.read_gds(infile=gds_file)
Expand Down
2 changes: 1 addition & 1 deletion hammer/vlsi/hammer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def run_dir(self) -> str:
try:
return self._rundir
except AttributeError:
return self._rundir
raise ValueError("Internal error: run dir location not set by hammer-vlsi")

@run_dir.setter
def run_dir(self, path: str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ reports = true
disable = ["no-else-return", "len-as-condition"]

[tool.pyright]
exclude = ["doc/**", "e2e/**", "test_scripts/**", "hammer/technology/asap7/gds_scale.py"]
exclude = ["doc/**", "e2e/**", "test_scripts/**"]
include = ["hammer", "tests"]
reportMissingImports = true
typeCheckingMode = "standard"

0 comments on commit 9f1043d

Please sign in to comment.