diff --git a/pyproject.toml b/pyproject.toml index 1e2224f..89a166f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,10 +32,10 @@ Issues = "https://git.pwarren.id.au/pwarren/PyFroniusReg/issues" [tool.ruff] # Set the maximum line length to 79. -line-length = 79 +line-length = 99 [tool.ruff.lint] # Add the `line-too-long` rule to the enforced rule set. By default, Ruff omits rules that # overlap with the use of a formatter, like Black, but we can override this behavior by # explicitly adding the rule. -extend-select = ["E501"] +extend-select = ["E501", "T20", "E", "PL"] diff --git a/src/pyfroniusreg/froniusreg.py b/src/pyfroniusreg/froniusreg.py index cb4af12..2416b31 100644 --- a/src/pyfroniusreg/froniusreg.py +++ b/src/pyfroniusreg/froniusreg.py @@ -24,7 +24,6 @@ class DataType: return self._decode(decoder) def encode_to_buffer(self, value): - print(type(value)) encoder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.BIG) self._add(encoder, value) return encoder.build() @@ -91,7 +90,8 @@ class registerReadError(Exception): # Constructor parameters: # address: address as specified in the spreadsheet # datatype: One of the above datatypes, as specified for the address in the spreadsheet -# unit: the modbus unit, either '1' for the fronius inverter or 200 for the attached fronius smart meter. +# unit: the modbus unit, either '1' for the fronius inverter or 200 for the attached fronius +# smart meter. # description: free text to describe the register's purpose class FroniusReg: def __init__(self, address, datatype, unit, description): diff --git a/tests/test_datatype.py b/tests/test_datatype.py index 3c04296..52c3c05 100644 --- a/tests/test_datatype.py +++ b/tests/test_datatype.py @@ -1,8 +1,7 @@ #!/usr/bin/env python3 import unittest -import pyfroniusreg.froniusreg as froniusreg - +from pyfroniusreg import froniusreg class TestDataTypes(unittest.TestCase): def test_int16(self):