Skip to content

Commit e335f12

Browse files
attempts to fix mypy issues
1 parent 0da4051 commit e335f12

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

meshtastic/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def getPref(node, comp_name) -> bool:
104104
for config in [localConfig, moduleConfig]:
105105
objDesc = config.DESCRIPTOR
106106
config_type = objDesc.fields_by_name.get(name[0])
107-
pref = False #FIXME - checkme - Used here as boolean, but set 2 lines below as a string.
107+
pref = "" #FIXME - is this correct to leave as an empty string if not found?
108108
if config_type:
109109
pref = config_type.message_type.fields_by_name.get(snake_name)
110110
if pref or wholeField:

meshtastic/ble_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def find_device(self, address: Optional[str]) -> BLEDevice:
151151
)
152152
return addressed_devices[0]
153153

154-
def _sanitize_address(address: Optional[str]) -> Optional[str]: # pylint: disable=E0213
154+
def _sanitize_address(self, address: Optional[str]) -> Optional[str]: # pylint: disable=E0213
155155
"Standardize BLE address by removing extraneous characters and lowercasing."
156156
if address is None:
157157
return None

meshtastic/serial_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, devPath: Optional[str]=None, debugOut=None, noProto: bool=Fal
5858
self.stream = serial.Serial(
5959
self.devPath, 115200, exclusive=True, timeout=0.5, write_timeout=0
6060
)
61-
self.stream.flush()
61+
self.stream.flush() # type: ignore[attr-defined]
6262
time.sleep(0.1)
6363

6464
StreamInterface.__init__(

0 commit comments

Comments
 (0)