Conversation
521ccf2 to
4246a97
Compare
There was a problem hiding this comment.
Pull Request Overview
Adds a new interactive CLI tool (aioartnet.listen) that uses prompt_toolkit to display Art-Net universe data and event history in a full-screen terminal UI.
- Introduces
listen.pywith an asyncmainfunction that connects toArtNetClient, handles incoming events, and updates a live prompt UI. - Parses command-line arguments for network interface, port name, and universes to view.
- Binds a “q” key to exit and maintains a scrolling history of non-DMX events.
Comments suppressed due to low confidence (4)
aioartnet/listen.py:21
- [nitpick] The variable
dmxstris not PEP8-compliant and is unclear; consider renaming it todmx_stroruniverse_display_strfor better readability.
dmxstr = "Waiting for DMX data"
aioartnet/listen.py:20
- [nitpick] Public function
mainlacks a docstring. Add one summarizing its purpose, parameters, and expected behavior.
async def main(client: ArtNetClient) -> None:
aioartnet/listen.py:20
- The new CLI functionality in
mainhas no test coverage; consider adding tests for argument parsing, event handling, and UI exit conditions.
async def main(client: ArtNetClient) -> None:
aioartnet/listen.py:118
- You're checking
args.portNamebut the argument parser defines--port-name, so the attribute isargs.port_name. Update this to avoid anAttributeError.
if args.portName:
| await application.run_async() | ||
|
|
||
| # Cancel event listener | ||
| task.cancel() |
There was a problem hiding this comment.
The ArtNetClient connection is never closed after cancelling the event listener; consider calling await client.disconnect() (or the appropriate cleanup method) to properly release network resources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
prompt_toolkit