Skip to content

Commit

Permalink
suppress lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjiU committed Jun 19, 2024
1 parent be581d4 commit b632307
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 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,5 +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 b632307

Please sign in to comment.