Skip to content

Commit b57d1d8

Browse files
committed
Fix up pylint from merged PR
1 parent 4c97866 commit b57d1d8

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

meshtastic/mesh_interface.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import google.protobuf.json_format
1414
import timeago # type: ignore[import-untyped]
15-
from google.protobuf.json_format import MessageToJson
1615
from pubsub import pub # type: ignore[import-untyped]
1716
from tabulate import tabulate
1817

meshtastic/node.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import logging
66
import time
77

8-
from google.protobuf.json_format import MessageToJson
9-
108
from meshtastic import admin_pb2, apponly_pb2, channel_pb2, localonly_pb2, portnums_pb2
119
from meshtastic.util import (
1210
Timeout,

meshtastic/tests/test_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ def test_active_ports_on_supported_devices_mac_duplicates_check(mock_platform, m
551551

552552
@pytest.mark.unit
553553
def test_message_to_json_shows_all():
554+
"""Test that message_to_json prints fields that aren't included in data passed in"""
554555
actual = json.loads(message_to_json(MyNodeInfo()))
555556
expected = { "myNodeNum": 0, "rebootCount": 0, "minAppVersion": 0 }
556557
assert actual == expected

meshtastic/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,5 +614,5 @@ def check_if_newer_version():
614614
return pypi_version
615615

616616
def message_to_json(message):
617+
"Return protobuf message as JSON. Always print all fields, even when not present in data."
617618
return stripnl(MessageToJson(message, always_print_fields_with_no_presence=True))
618-

0 commit comments

Comments
 (0)