Skip to content

Commit f81ed36

Browse files
nkpro2000srbessman
authored andcommitted
lint
1 parent ddfcf44 commit f81ed36

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

pslab/bus/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
(SPI and UART still TODO)
44
"""
5+
56
from pslab.bus.i2c import I2CMaster, I2CSlave
67

78
__all__ = (

pslab/bus/busio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
>>> sensor = adafruit_bno055.BNO055_I2C(i2c)
2828
>>> print(sensor.gyro)
2929
"""
30+
3031
from typing import List, Union
3132

3233
from pslab.bus.i2c import I2CPrimitive

pslab/bus/i2c.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
1818
>>> rtc = I2CSlave(address=104)
1919
"""
20+
2021
import logging
2122
from typing import List
2223

@@ -385,6 +386,7 @@ def _read(self, bytes_to_read: int) -> bytearray:
385386

386387
for _ in range(bytes_to_read - 1):
387388
data.append(self._read_more())
389+
388390
data.append(self._read_end())
389391

390392
return data
@@ -513,6 +515,7 @@ def ping(self) -> bool:
513515
"""
514516
response = self._start(self.address, self._READ)
515517
self._stop()
518+
516519
return response == self._ACK
517520

518521
def read(self, bytes_to_read: int, register_address: int = 0x0) -> bytearray:
@@ -572,6 +575,7 @@ def read_int(self, register_address: int = 0x0) -> int:
572575
Two bytes interpreted as a uint16.
573576
"""
574577
data = self.read(2, register_address)
578+
575579
return CP.ShortInt.unpack(data)[0]
576580

577581
def read_long(self, register_address: int = 0x0) -> int:
@@ -589,6 +593,7 @@ def read_long(self, register_address: int = 0x0) -> int:
589593
Four bytes interpreted as a uint32.
590594
"""
591595
data = self.read(4, register_address)
596+
592597
return CP.Integer.unpack(data)[0]
593598

594599
def write(self, bytes_to_write: bytearray, register_address: int = 0x0):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy