-
Notifications
You must be signed in to change notification settings - Fork 295
Protobuf type interfaces for type-checking & undoing protobufs hack #528
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
Changes from all commits
4528cbf
4baef92
5909166
03ceb9b
ffa2de5
7a1b4b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,16 +9,15 @@ | |
| import sys | ||
| import time | ||
|
|
||
| import pyqrcode | ||
| import pyqrcode # type: ignore[import-untyped] | ||
| import yaml | ||
| from google.protobuf.json_format import MessageToDict | ||
| from pubsub import pub | ||
| from pubsub import pub # type: ignore[import-untyped] | ||
|
|
||
| import meshtastic.test | ||
| import meshtastic.util | ||
| from meshtastic import channel_pb2, config_pb2, portnums_pb2, remote_hardware | ||
| from meshtastic import channel_pb2, config_pb2, portnums_pb2, remote_hardware, BROADCAST_ADDR | ||
| from meshtastic.version import get_active_version | ||
| from meshtastic.__init__ import BROADCAST_ADDR | ||
|
Comment on lines
-19
to
-21
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this import from |
||
| from meshtastic.ble_interface import BLEInterface | ||
| from meshtastic.globals import Globals | ||
|
|
||
|
|
@@ -147,7 +146,7 @@ def setPref(config, comp_name, valStr) -> bool: | |
|
|
||
| objDesc = config.DESCRIPTOR | ||
| config_type = objDesc.fields_by_name.get(name[0]) | ||
| pref = False | ||
| pref = None | ||
| if config_type and config_type.message_type is not None: | ||
| pref = config_type.message_type.fields_by_name.get(snake_name) | ||
| # Others like ChannelSettings are standalone | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what gets the
pyifiles to be generated.