Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove lint warnings from bmp085.py #375

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading