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 ast import literal_eval
from typing import Iterable, List from typing import Iterable, List
from solar_ble import parse_packet
from table_drawing import table from table_drawing import table
from srnemqtt import parse_packet
def memory_table( def memory_table(
data: Iterable[int], data: Iterable[int],

View file

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

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from feasycom_ble import BTLEUart from srnemqtt import MAC, construct_request, write
from solar_ble import MAC, construct_request, write from srnemqtt.feasycom_ble import BTLEUart
with BTLEUart(MAC, timeout=1) as x: 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 bluepy import btle
from libscrc import modbus from libscrc import modbus
from feasycom_ble import BTLEUart from .config import get_config, get_consumers
from solar_types import DATA_BATTERY_STATE, HISTORICAL_DATA, DataItem, DataName from .feasycom_ble import BTLEUart
from test_config import get_config, get_consumers from .solar_types import DATA_BATTERY_STATE, HISTORICAL_DATA, DataItem, DataName
MAC = "DC:0D:30:9C:61:BA" MAC = "DC:0D:30:9C:61:BA"

View file

@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Type
import yaml import yaml
from consumers import BaseConsumer from .consumers import BaseConsumer
def get_consumer(name: str) -> Optional[Type[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 import paho.mqtt.client as mqtt
from solar_types import DataName from ..solar_types import DataName
from . import BaseConsumer from . import BaseConsumer
MAP_VALUES: Dict[DataName, Dict[str, Any]] = { MAP_VALUES: Dict[DataName, Dict[str, Any]] = {

View file

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