Fix coding style issues

This commit is contained in:
Ronald Pijnacker 2022-01-04 09:53:49 +01:00
parent dd6d26670e
commit eace91b591
6 changed files with 3 additions and 8 deletions

View File

@ -1,4 +1,3 @@
import asyncio
import logging import logging
import serial import serial
import serial_asyncio import serial_asyncio

View File

@ -179,7 +179,7 @@ class ProfileGenericObject(DSMRObject):
self._buffer_list = [] self._buffer_list = []
values_offset = 2 values_offset = 2
for i in range(self.buffer_length): for i in range(self.buffer_length):
offset = values_offset + i*2 offset = values_offset + i * 2
self._buffer_list.append(MBusObject([self.values[offset], self.values[offset + 1]])) self._buffer_list.append(MBusObject([self.values[offset], self.values[offset + 1]]))
return self._buffer_list return self._buffer_list

View File

@ -7,4 +7,4 @@ PG_HEAD_PARSERS = [ValueParser(int), ValueParser(str)]
PG_UNIDENTIFIED_BUFFERTYPE_PARSERS = [ValueParser(str), ValueParser(str)] PG_UNIDENTIFIED_BUFFERTYPE_PARSERS = [ValueParser(str), ValueParser(str)]
BUFFER_TYPES = { BUFFER_TYPES = {
PG_FAILURE_EVENT: [ValueParser(timestamp), ValueParser(int)] PG_FAILURE_EVENT: [ValueParser(timestamp), ValueParser(int)]
} }

View File

@ -157,7 +157,7 @@ LUXEMBOURG_SMARTY['objects'].update({
obis.LUXEMBOURG_ELECTRICITY_DELIVERED_TARIFF_GLOBAL: CosemParser(ValueParser(Decimal)), obis.LUXEMBOURG_ELECTRICITY_DELIVERED_TARIFF_GLOBAL: CosemParser(ValueParser(Decimal)),
}) })
# Source: https://www.energiforetagen.se/globalassets/energiforetagen/det-erbjuder-vi/kurser-och-konferenser/elnat/branschrekommendation-lokalt-granssnitt-v2_0-201912.pdf # Source: https://www.energiforetagen.se/globalassets/energiforetagen/det-erbjuder-vi/kurser-och-konferenser/elnat/branschrekommendation-lokalt-granssnitt-v2_0-201912.pdf # noqa
SWEDEN = { SWEDEN = {
'checksum_support': True, 'checksum_support': True,
'objects': { 'objects': {

View File

@ -3,8 +3,6 @@ from unittest.mock import Mock
import unittest import unittest
from dsmr_parser import obis_references as obis from dsmr_parser import obis_references as obis
from dsmr_parser import telegram_specifications
from dsmr_parser.parsers import TelegramParser
from dsmr_parser.clients.protocol import create_dsmr_protocol from dsmr_parser.clients.protocol import create_dsmr_protocol

View File

@ -3,8 +3,6 @@ from unittest.mock import Mock
import unittest import unittest
from dsmr_parser import obis_references as obis from dsmr_parser import obis_references as obis
from dsmr_parser import telegram_specifications
from dsmr_parser.parsers import TelegramParser
from dsmr_parser.clients.rfxtrx_protocol import create_rfxtrx_dsmr_protocol, PACKETTYPE_DSMR, SUBTYPE_P1 from dsmr_parser.clients.rfxtrx_protocol import create_rfxtrx_dsmr_protocol, PACKETTYPE_DSMR, SUBTYPE_P1