Skip to content

Commit cc411ce

Browse files
committed
remove nargs and unneeded fstrings
1 parent edff956 commit cc411ce

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

meshtastic/__main__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,6 @@ def addRemoteActionArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentPar
16491649
"You need pass the destination ID as argument, like "
16501650
"this: '--traceroute !ba4bf9d0' "
16511651
"Only nodes with a shared channel can be traced.",
1652-
nargs=1,
16531652
metavar=("!XXXXXXXX", "0xXXXXXXXX"),
16541653
)
16551654

@@ -1730,31 +1729,26 @@ def addRemoteAdminArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentPars
17301729
group.add_argument(
17311730
"--remove-node",
17321731
help="Tell the destination node to remove a specific node from its DB, by node number or ID",
1733-
nargs=1,
17341732
metavar=("!XXXXXXXX", "0xXXXXXXXX")
17351733
)
17361734
group.add_argument(
17371735
"--set-favorite-node",
17381736
help="Tell the destination node to set the specified node to be favorited on the NodeDB on the devicein its DB, by number or ID",
1739-
nargs=1,
17401737
metavar=("!XXXXXXXX", "0xXXXXXXXX")
17411738
)
17421739
group.add_argument(
17431740
"--remove-favorite-node",
17441741
help="Tell the destination node to set the specified node to be un-favorited on the NodeDB on the device, by number or ID",
1745-
nargs=1,
17461742
metavar=("!XXXXXXXX", "0xXXXXXXXX")
17471743
)
17481744
group.add_argument(
17491745
"--set-ignored-node",
17501746
help="Tell the destination node to set the specified node to be ignored on the NodeDB on the devicein its DB, by number or ID",
1751-
nargs=1,
1752-
metavar=("!XXXXXXXX", "0xXXXXXXXX")
1747+
metavar="!XXXXXXXX"
17531748
)
17541749
group.add_argument(
17551750
"--remove-ignored-node",
17561751
help="Tell the destination node to set the specified node to be un-ignored on the NodeDB on the device, by number or ID",
1757-
nargs=1,
17581752
metavar=("!XXXXXXXX", "0xXXXXXXXX")
17591753
)
17601754
group.add_argument(

meshtastic/mesh_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def getNode(
345345
if new_index != last_index:
346346
retries_left = requestChannelAttempts - 1
347347
if retries_left <= 0:
348-
our_exit(f"Error: Timed out waiting for channels, giving up")
348+
our_exit("Error: Timed out waiting for channels, giving up")
349349
print("Timed out trying to retrieve channel info, retrying")
350350
n.requestChannels(startingIndex=new_index)
351351
last_index = new_index
@@ -929,7 +929,7 @@ def _sendPacket(
929929
toRadio.packet.CopyFrom(meshPacket)
930930
if self.noProto:
931931
logging.warning(
932-
f"Not sending packet because protocol use is disabled by noProto"
932+
"Not sending packet because protocol use is disabled by noProto"
933933
)
934934
else:
935935
logging.debug(f"Sending packet: {stripnl(meshPacket)}")

0 commit comments

Comments
 (0)