Skip to content

Commit

Permalink
Remove lint warnings from bmp085.py (#375)
Browse files Browse the repository at this point in the history
* suppress lint warnings
  • Loading branch information
BenjiU authored Jun 19, 2024
1 parent 3eee9a1 commit 650cf03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mqtt_io/modules/sensor/bmp085.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Sensor(GenericSensor):
def setup_module(self) -> None:
# pylint: disable=import-outside-toplevel,attribute-defined-outside-init
# pylint: disable=import-error,no-member
from Adafruit_BMP.BMP085 import BMP085
from Adafruit_BMP.BMP085 import BMP085 # type: ignore

self.address: int = self.config["chip_addr"]
self.bmp = BMP085(address=self.address)
Expand All @@ -46,6 +46,6 @@ def get_value(self, sens_conf: ConfigType) -> SensorValueType:
Get the temperature, humidity or pressure value from the sensor
"""
sens_type = sens_conf["type"]
data = DATA_READER[sens_type](self.bmp)
#error: Call to untyped function (unknown) in typed context
data = DATA_READER[sens_type](self.bmp) # type: ignore
return cast(float, data)

2 changes: 1 addition & 1 deletion mqtt_io/modules/sensor/dht22.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Sensor(GenericSensor):
def setup_module(self) -> None:
# pylint: disable=import-outside-toplevel,import-error
import adafruit_dht # type: ignore
from microcontroller import Pin
from microcontroller import Pin # type: ignore

sensor_type: str = self.config["type"].lower()

Expand Down

0 comments on commit 650cf03

Please sign in to comment.