Skip to content

Commit

Permalink
extraneous type:ignores with local mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisonliew committed Mar 20, 2023
1 parent e46748b commit b0f5f95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hammer/generate_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def main(args) -> int:
if dry_run:
print(contents, end='')
else:
with open(filename, "w") as f: # type: ignore
with open(filename, "w") as f:
f.write(contents)

return 0
Expand Down
6 changes: 3 additions & 3 deletions hammer/technology/sky130/sram_compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def generate_sram(self, params: SRAMParameters, corner: MMMCCorner) -> ExtraLibr

if params.family != "1rw" and params.family != "1rw1r":
self.logger.error("SKY130 SRAM cache does not support family:{f}".format(f=params.family))
return ExtraLibrary(prefix=None, library=None) # type: ignore
return ExtraLibrary(prefix=None, library=None)

if params.name.startswith("sramgen_sram"):
self.logger.info(f"Compiling {params.family} memories to SRAM22 instances")
Expand All @@ -55,7 +55,7 @@ def generate_sram(self, params: SRAMParameters, corner: MMMCCorner) -> ExtraLibr
lib_path="{b}/{n}/{n}_{c}.lib".format(b=base_dir,n=sram_name,c=corner_str)
if not os.path.exists(lib_path):
self.logger.error(f"SKY130 {params.family} SRAM cache does not support corner: {corner_str}")

return ExtraLibrary(prefix=None, library=Library(
name=sram_name,
nldm_liberty_file=lib_path,
Expand Down Expand Up @@ -115,7 +115,7 @@ def setup_openram_spice(self,sram_name) -> None:
dest_path = f"{os.path.abspath(self.technology.cache_dir)}/{sram_name}/{sram_name}.lvs.sp"
self.technology.ensure_dirs_exist(dest_path)
if not source_path.exists():
raise FileNotFoundError(f"SRAM Spice file not found: {source_path}")
raise FileNotFoundError(f"SRAM Spice file not found: {source_path}")
with open(source_path,'r') as sf:
with open(dest_path,'w') as df:
self.logger.info("Modifying SRAM SPICE file: {} -> {}".format
Expand Down

0 comments on commit b0f5f95

Please sign in to comment.