browse.py print_browse() and send_to_telegram() too long #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The
print_browse()andsend_to_telegram()functions inskills/polymarket-browse/scripts/browse.pyare too long and contain a lot of inline code for formatting and displaying events.print_browse()(lines 474-549): ~75 linessend_to_telegram()(lines 579-709): ~130 linesBoth functions duplicate a lot of logic for formatting match/non-match events, which makes the code harder to maintain and extend.
Proposed Solution
Extract the inline formatting logic into smaller helper functions, for example:
format_match_event_line()/format_non_match_event_line()build_match_section()/build_non_match_section()This would reduce duplication and improve maintainability.
Alternatives Considered
Keep the functions as-is, but this leads to code duplication and harder maintenance as new event types or formatting rules are added.