Ruff passes on the whole package again
Three breaks had landed: one docstring line of 102 cells in public_default, and two calls that the formatter joins back onto one line in chat and menu. Nothing but the shape of the text changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19532570b3
commit
cd38012506
3 files changed
+6
-10
No files matched your search
@@ -738,9 +738,7 @@ async def _add_public_channel(ctx: AppContext) -> Conversation | None:
|
||||
channels = _channels_from_slots(await ctx.devstate.channel_slots())
|
||||
# The key identifies the channel, and not the slot: the write went to the slot that the
|
||||
# confirming read gave, which can be another slot than the one that the row named.
|
||||
return next(
|
||||
(c for c in channels if c.on_device and c.secret == DEFAULT_PUBLIC_SECRET), None
|
||||
)
|
||||
return next((c for c in channels if c.on_device and c.secret == DEFAULT_PUBLIC_SECRET), None)
|
||||
|
||||
|
||||
async def _read_channels(device: Device) -> list[Conversation]:
|
||||
|
||||
+1
-3
@@ -766,9 +766,7 @@ def _menu_lane(tools: Sequence[Any]) -> int:
|
||||
The column width from :func:`~meshterm.ui.menus.icon_lane`: ``0`` where the
|
||||
platform draws no icon lane.
|
||||
"""
|
||||
return icon_lane(
|
||||
[*(tool.icon for tool in tools), _QUIT_ICON, _SOUND_ON_ICON, _SOUND_OFF_ICON]
|
||||
)
|
||||
return icon_lane([*(tool.icon for tool in tools), _QUIT_ICON, _SOUND_ON_ICON, _SOUND_OFF_ICON])
|
||||
|
||||
|
||||
def _menu_labels(tools: Sequence[Any], *, lane: int | None = None) -> list[Text]:
|
||||
|
||||
@@ -93,10 +93,10 @@ async def add_public_when_empty(ctx: AppContext) -> bool:
|
||||
|
||||
The function does its best only, and it is quiet. It does nothing in these cases: the
|
||||
preference is off, the simulator, no live link, a device that has a channel, or a probe
|
||||
that could not prove that the device has none. It never opens the radio itself. A deferred connect
|
||||
(``connect_on_start`` off) skips the function, because ``is_connected`` is false. A
|
||||
failure here must not stop the user from reaching the menu, so the function guards each
|
||||
step.
|
||||
that could not prove that the device has none. It never opens the radio itself. A
|
||||
deferred connect (``connect_on_start`` off) skips the function, because
|
||||
``is_connected`` is false. A failure here must not stop the user from reaching the
|
||||
menu, so the function guards each step.
|
||||
|
||||
Args:
|
||||
ctx: The shared application context.
|
||||
|
||||
Reference in new issue
Block a user