style: fix lint errors + reformat source with black

This commit is contained in:
Uri Shaked
2023-09-21 22:30:52 +03:00
parent 7d48aab542
commit aa8f760375
14 changed files with 1285 additions and 954 deletions
+9 -6
View File
@@ -1,6 +1,7 @@
import os
from typing import List, Dict, TypedDict, Optional
import json
import os
from typing import Dict, List, Optional, TypedDict
class Port(TypedDict):
kind: str
@@ -8,6 +9,7 @@ class Port(TypedDict):
direction: str
description: str
class Cell(TypedDict):
description: str
file_prefix: str
@@ -19,10 +21,11 @@ class Cell(TypedDict):
verilog_name: str
equation: Optional[str]
Cells = Dict[str, Cell]
def load_cells() -> Cells:
script_dir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(script_dir, 'cells.json')) as fh:
return json.load(fh)
def load_cells() -> Cells:
script_dir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(script_dir, "cells.json")) as fh:
return json.load(fh)