Skip to content

Commit 99cf16e

Browse files
author
James Boulton
committed
fxn
1 parent 8eec0d3 commit 99cf16e

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

dashio/iotcontrol/table.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@
2222
SOFTWARE.
2323
"""
2424
from __future__ import annotations
25+
2526
import logging
26-
from ..constants import BAD_CHARS
27-
from .control import Control, ControlPosition, ControlConfig, _get_title_position, _get_precision
28-
from .enums import (
29-
Precision,
30-
TitlePosition
31-
)
3227

28+
from ..constants import BAD_CHARS
29+
from .control import (Control, ControlConfig, ControlPosition, _get_precision,
30+
_get_title_position)
31+
from .enums import Precision, TitlePosition
3332

3433
logger = logging.getLogger(__name__)
3534

@@ -88,12 +87,13 @@ def from_dict(cls, cfg_dict: dict):
8887
class TableRow:
8988
"""A Table Row
9089
"""
90+
9191
def __init__(
9292
self,
9393
label: str | None = None,
9494
columns: list[str] | None = None,
9595
units: str | None = None,
96-
) -> None:
96+
) -> None:
9797
self.label = label
9898
if columns is None:
9999
self.columns = columns
@@ -207,10 +207,9 @@ def _send_row(self, row_number: int, table_row: TableRow | None) -> str:
207207
if table_row.label is None:
208208
row_label = ""
209209
return f"{header_str}{row_number}\t{columns}\t{row_label}\t{table_row.units}\n"
210-
else:
211-
if table_row.label is None:
212-
return f"{header_str}{row_number}\t{columns}\n"
213-
return f"{header_str}{row_number}\t{columns}\t{row_label}\n"
210+
if table_row.label is None:
211+
return f"{header_str}{row_number}\t{columns}\n"
212+
return f"{header_str}{row_number}\t{columns}\t{table_row.label}\n"
214213

215214
def add_table_row(self, table_row: TableRow):
216215
"""Add a row to the table and send it"""

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ c64_decode = "dashio.utilities.c64_decode:main"
4747
dashio_data_exporter = "dashio.utilities.dashio_data_exporter:main"
4848

4949
[tool.setuptools]
50-
packages = ["dashio"]
5150
zip-safe = false
5251

52+
[tool.setuptools.packages.find]
53+
where = ["."]
54+
5355
[tool.setuptools.package-data]
5456
dashio = ["py.typed"]
5557

0 commit comments

Comments
 (0)