Ticket #44577

generate_packets.py: overhaul Variant.get_send() and Variant.get_receive() string formatting

Eröffnet am: 2022-05-13 05:34 Letztes Update: 2022-05-16 23:56

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
Keine

Details

Part of #43927. Split from #44575. The get_send() and get_receive() methods of the Variant class do their own formatting thing that needs to be replaced with something more robust. For this reason, they've been left out of a number of recent refactorings, which should also be applied to them once viable.

Steps to be done:

  • For Variant.get_receive(), along with Variant.get_delta_receive_body() (and Field.get_get_real()):
    • #44597 Replace the <var>-based custom formatting with a string join
    • #44598 Distribute the % (printf-style) formatting out to the individual parts (that need them) in get_receive()
    • #44599 Replace % formatting with str.format() and only the required arguments in get_receive(); cf. #44575
    • #44601 Deal with string formatting in get_delta_receive_body() (and Field.get_get_real())
  • For Variant.get_send(), along with Variant.get_delta_send_body()
    • #44602 Give get_delta_send_body() access to pre2 (in some way) so that it doesn't need the custom formatting anymore
    • #44603 Replace the <var>-based custom formatting with a string join
    • #44604 Distribute the % (printf-style) formatting out to the individual parts (that need them) in get_send()
    • #44605 Replace % formatting with str.format() and only the required arguments in get_send(); cf. #44575
    • #44606 Deal with string formatting in get_delta_send_body()
  • #44607 Apply the equivalent of #44584 to the resulting code

Ticket-Verlauf (3/8 Historien)

2022-05-13 05:34 Aktualisiert von: alienvalkyrie
  • New Ticket "generate_packets.py: overhaul Variant.get_send() and Variant.get_receive() string formatting" created
2022-05-15 04:04 Aktualisiert von: alienvalkyrie
  • Details Updated
Kommentar

I'll be using this ticket as a smaller metaticket, since the affected code is large enough that it should probably be done in multiple steps.

2022-05-15 04:17 Aktualisiert von: alienvalkyrie
  • Details Updated
2022-05-15 06:15 Aktualisiert von: alienvalkyrie
  • Details Updated
Kommentar

get_receive() parts done.

2022-05-15 06:30 Aktualisiert von: alienvalkyrie
  • Details Updated
2022-05-15 08:12 Aktualisiert von: alienvalkyrie
  • Details Updated
2022-05-15 09:05 Aktualisiert von: alienvalkyrie
  • Details Updated
Kommentar

All sub-issues are now in review. Once they are merged, this ticket will be closed.

2022-05-16 23:56 Aktualisiert von: alienvalkyrie
  • Status Update from Offen to Geschlossen
  • Lösung Update from Keine to Gefixt
  • Typ Update from Patches to Tasks

Dateianhangliste

Keine Anhänge

Bearbeiten

Please login to add comment to this ticket » Anmelden