Skip to content

Commit e521dfc

Browse files
authored
rename _proxy to _bus_implementation
Based on feedback from @FoamyGuy.
1 parent 9f0cb10 commit e521dfc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_bme280/basic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ class Adafruit_BME280:
8989
"""
9090

9191
# pylint: disable=too-many-instance-attributes
92-
def __init__(self, proxy: typing.Union[I2C_Impl, SPI_Impl]) -> None:
92+
def __init__(self, bus_implementation: typing.Union[I2C_Impl, SPI_Impl]) -> None:
9393
"""Check the BME280 was found, read the coefficients and enable the sensor"""
9494
# Check device ID.
95-
self._proxy = proxy
95+
self._bus_implementation = bus_implementation
9696
chip_id = self._read_byte(_BME280_REGISTER_CHIPID)
9797
if _BME280_CHIPID != chip_id:
9898
raise RuntimeError("Failed to find BME280! Chip ID 0x%x" % chip_id)
@@ -311,10 +311,10 @@ def _read24(self, register: int) -> float:
311311
return ret
312312

313313
def _read_register(self, register: int, length: int) -> bytearray:
314-
return self._proxy.read_register(register, length)
314+
return self._bus_implementation.read_register(register, length)
315315

316316
def _write_register_byte(self, register: int, value: int) -> None:
317-
self._proxy.write_register_byte(register, value)
317+
self._bus_implementation.write_register_byte(register, value)
318318

319319

320320
class Adafruit_BME280_I2C(Adafruit_BME280):

0 commit comments

Comments
 (0)