This commit is contained in:
Odd Stråbø 2023-01-07 18:24:41 +01:00
parent 853ee3db4a
commit 4d96174cfa
8 changed files with 12 additions and 13 deletions

2
.isort.cfg Normal file
View file

@ -0,0 +1,2 @@
[settings]
profile = black

View file

@ -2,9 +2,10 @@
from ast import literal_eval
from typing import Iterable, List
from solar_ble import parse_packet
from table_drawing import table
from srnemqtt import parse_packet
def memory_table(
data: Iterable[int],

View file

@ -7,7 +7,7 @@ from typing import Any, Dict
import rrdtool
from solar_types import DataName
from srnemqtt.solar_types import DataName
DT_FORMAT = "%Y-%m-%d %H:%M:%S.%f"

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from feasycom_ble import BTLEUart
from solar_ble import MAC, construct_request, write
from srnemqtt import MAC, construct_request, write
from srnemqtt.feasycom_ble import BTLEUart
with BTLEUart(MAC, timeout=1) as x:

View file

@ -12,9 +12,9 @@ from typing import Callable, Collection, Optional, cast
from bluepy import btle
from libscrc import modbus
from feasycom_ble import BTLEUart
from solar_types import DATA_BATTERY_STATE, HISTORICAL_DATA, DataItem, DataName
from test_config import get_config, get_consumers
from .config import get_config, get_consumers
from .feasycom_ble import BTLEUart
from .solar_types import DATA_BATTERY_STATE, HISTORICAL_DATA, DataItem, DataName
MAC = "DC:0D:30:9C:61:BA"

View file

@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Type
import yaml
from consumers import BaseConsumer
from .consumers import BaseConsumer
def get_consumer(name: str) -> Optional[Type[BaseConsumer]]:

View file

@ -6,8 +6,7 @@ from uuid import uuid4
import paho.mqtt.client as mqtt
from solar_types import DataName
from ..solar_types import DataName
from . import BaseConsumer
MAP_VALUES: Dict[DataName, Dict[str, Any]] = {

View file

@ -1,6 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203, I201, I101
[tool.isort]
profile = "black"