Apply black
This commit is contained in:
parent
5183fdaee4
commit
0b173700fa
@ -207,7 +207,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:
|
||||
|
||||
@ -86,7 +86,6 @@ class Options:
|
||||
_image_paths: List = field(default_factory=list)
|
||||
|
||||
def __post_init__(self):
|
||||
|
||||
self.bgcolor = SingleColor(self.bgcolor)
|
||||
self.bgcolor_node = SingleColor(self.bgcolor_node)
|
||||
self.bgcolor_connector = SingleColor(self.bgcolor_connector)
|
||||
@ -124,7 +123,6 @@ class Image:
|
||||
# See also HTML doc at https://graphviz.org/doc/info/shapes.html#html
|
||||
|
||||
def __post_init__(self):
|
||||
|
||||
self.bgcolor = SingleColor(self.bgcolor)
|
||||
|
||||
if self.fixedsize is None:
|
||||
@ -258,7 +256,7 @@ class Component:
|
||||
else:
|
||||
return self.amount
|
||||
|
||||
@property
|
||||
@property
|
||||
def has_pn_info(self) -> bool:
|
||||
return any([self.pn, self.manufacturer, self.mpn, self.supplier, self.spn])
|
||||
|
||||
@ -368,7 +366,6 @@ class Connector(TopLevelGraphicalComponent):
|
||||
return None # connectors do not support units.
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
||||
super().fill_partnumbers()
|
||||
|
||||
self.bgcolor = SingleColor(self.bgcolor)
|
||||
@ -654,7 +651,6 @@ class Cable(TopLevelGraphicalComponent):
|
||||
return None # non-bundles do not support lists of part data
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
||||
super().fill_partnumbers()
|
||||
|
||||
self.bgcolor = SingleColor(self.bgcolor)
|
||||
|
||||
@ -230,8 +230,15 @@ def nested_table(lines: List[Td]) -> Table:
|
||||
def nested_table_dict(d: dict) -> Table:
|
||||
rows = []
|
||||
for k, v in d.items():
|
||||
rows.append(Tr([Td(k, align="left", balign="left", valign="top"), Td(html_line_breaks(v), align="left", balign="left")]))
|
||||
return Table(rows, border=0, cellborder=1, cellpadding=3, cellspacing=0)
|
||||
rows.append(
|
||||
Tr(
|
||||
[
|
||||
Td(k, align="left", balign="left", valign="top"),
|
||||
Td(html_line_breaks(v), align="left", balign="left"),
|
||||
]
|
||||
)
|
||||
)
|
||||
return Table(rows, border=0, cellborder=1, cellpadding=3, cellspacing=0)
|
||||
|
||||
|
||||
def gv_pin_table(component) -> Table:
|
||||
@ -282,7 +289,6 @@ def gv_conductor_table(cable) -> Table:
|
||||
|
||||
inserted_break_inbetween = False
|
||||
for wire in cable.wire_objects.values():
|
||||
|
||||
# insert blank space between wires and shields
|
||||
if isinstance(wire, ShieldClass) and not inserted_break_inbetween:
|
||||
rows.append(Tr(Td(" "))) # spacer row between wires and shields
|
||||
|
||||
@ -35,7 +35,11 @@ from wireviz.wv_graphviz import (
|
||||
parse_arrow_str,
|
||||
set_dot_basics,
|
||||
)
|
||||
from wireviz.wv_output import embed_svg_images, embed_svg_images_file, generate_html_output
|
||||
from wireviz.wv_output import (
|
||||
embed_svg_images,
|
||||
embed_svg_images_file,
|
||||
generate_html_output,
|
||||
)
|
||||
from wireviz.wv_utils import bom2tsv, open_file_write
|
||||
|
||||
|
||||
@ -217,7 +221,7 @@ class Harness:
|
||||
to_pin: Union[int, str],
|
||||
) -> None:
|
||||
# check from and to connectors
|
||||
for (name, pin) in zip([from_name, to_name], [from_pin, to_pin]):
|
||||
for name, pin in zip([from_name, to_name], [from_pin, to_pin]):
|
||||
if name is not None and name in self.connectors:
|
||||
connector = self.connectors[name]
|
||||
# check if provided name is ambiguous
|
||||
|
||||
@ -68,7 +68,6 @@ def generate_html_output(
|
||||
metadata: Metadata,
|
||||
options: Options,
|
||||
):
|
||||
|
||||
# load HTML template
|
||||
templatename = metadata.get("template", {}).get("name")
|
||||
if templatename:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user