Apply black *.py ../../setup.py
black==23.3.0
This commit is contained in:
parent
828de3f118
commit
73f56b2efc
@ -91,7 +91,6 @@ class Image:
|
||||
# See also HTML doc at https://graphviz.org/doc/info/shapes.html#html
|
||||
|
||||
def __post_init__(self):
|
||||
|
||||
if self.fixedsize is None:
|
||||
# Default True if any dimension specified unless self.scale also is specified.
|
||||
self.fixedsize = (self.width or self.height) and self.scale is None
|
||||
@ -166,7 +165,6 @@ class Connector:
|
||||
additional_components: List[AdditionalComponent] = field(default_factory=list)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
||||
if isinstance(self.image, dict):
|
||||
self.image = Image(**self.image)
|
||||
|
||||
@ -276,7 +274,6 @@ class Cable:
|
||||
additional_components: List[AdditionalComponent] = field(default_factory=list)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
||||
if isinstance(self.image, dict):
|
||||
self.image = Image(**self.image)
|
||||
|
||||
@ -386,7 +383,6 @@ class Cable:
|
||||
to_name: Optional[Designator],
|
||||
to_pin: NoneOrMorePinIndices,
|
||||
) -> None:
|
||||
|
||||
from_pin = int2tuple(from_pin)
|
||||
via_wire = int2tuple(via_wire)
|
||||
to_pin = int2tuple(to_pin)
|
||||
|
||||
@ -57,12 +57,14 @@ OLD_CONNECTOR_ATTR = {
|
||||
"autogenerate": "is replaced with new syntax in v0.4",
|
||||
}
|
||||
|
||||
|
||||
def check_old(node: str, old_attr: dict, args: dict) -> None:
|
||||
"""Raise exception for any outdated attributes in args."""
|
||||
for attr, descr in old_attr.items():
|
||||
if attr in args:
|
||||
raise ValueError(f"'{attr}' in {node}: '{attr}' {descr}")
|
||||
|
||||
|
||||
@dataclass
|
||||
class Harness:
|
||||
metadata: Metadata
|
||||
@ -184,7 +186,6 @@ class Harness:
|
||||
dot.attr("edge", style="bold", fontname=self.options.fontname)
|
||||
|
||||
for connector in self.connectors.values():
|
||||
|
||||
# If no wires connected (except maybe loop wires)?
|
||||
if not (connector.ports_left or connector.ports_right):
|
||||
connector.ports_left = True # Use left side pins.
|
||||
@ -294,7 +295,6 @@ class Harness:
|
||||
)
|
||||
|
||||
for cable in self.cables.values():
|
||||
|
||||
html = []
|
||||
|
||||
awg_fmt = ""
|
||||
|
||||
@ -209,7 +209,6 @@ def parse(
|
||||
expected_type = alternating_types[1 - alternating_types.index(expected_type)]
|
||||
|
||||
for connection_set in connection_sets:
|
||||
|
||||
# figure out number of parallel connections within this set
|
||||
connectioncount = []
|
||||
for entry in connection_set:
|
||||
|
||||
@ -22,7 +22,6 @@ def generate_html_output(
|
||||
metadata: Metadata,
|
||||
options: Options,
|
||||
):
|
||||
|
||||
# load HTML template
|
||||
templatename = metadata.get("template", {}).get("name")
|
||||
if templatename:
|
||||
@ -112,9 +111,9 @@ def generate_html_output(
|
||||
if isinstance(entry, Dict):
|
||||
replacements[f"<!-- %{item}_{index+1}% -->"] = str(category)
|
||||
for entry_key, entry_value in entry.items():
|
||||
replacements[f"<!-- %{item}_{index+1}_{entry_key}% -->"] = (
|
||||
html_line_breaks(str(entry_value))
|
||||
)
|
||||
replacements[
|
||||
f"<!-- %{item}_{index+1}_{entry_key}% -->"
|
||||
] = html_line_breaks(str(entry_value))
|
||||
elif isinstance(entry, (str, int, float)):
|
||||
pass # TODO?: replacements[f"<!-- %{item}_{category}% -->"] = html_line_breaks(str(entry))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user