1
0
mirror of https://github.com/pommi/python-itho-wpu.git synced 2025-06-30 23:45:43 +02:00

style: apply flake8 and black formatting

To check for errors:
$ pre-commit run --all-files

To install as pre-commit hook:
$ pre-commit install
This commit is contained in:
2021-05-30 14:09:27 +02:00
parent 8c7d0ed947
commit 751182b70d
8 changed files with 171 additions and 89 deletions

View File

@ -32,7 +32,7 @@ class I2CRaw:
def read_i2c_block_data(self, n_bytes):
data_raw = self.fr.read(n_bytes)
unpack_format = 'B'*n_bytes
unpack_format = "B" * n_bytes
return list(struct.unpack(unpack_format, data_raw))
def close(self):
@ -80,7 +80,7 @@ class I2CMaster:
self.i.close()
class I2CSlave():
class I2CSlave:
def __init__(self, address, queue):
self.address = address
self.queue = queue