待辦事項 #44577

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

啟用日期: 2022-05-13 05:34 最後更新: 2022-05-16 23:56

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:

細節

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 History (3/8 Histories)

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

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 Updated by: alienvalkyrie
  • Details Updated
2022-05-15 06:15 Updated by: alienvalkyrie
  • Details Updated
評語

get_receive() parts done.

2022-05-15 06:30 Updated by: alienvalkyrie
  • Details Updated
2022-05-15 08:12 Updated by: alienvalkyrie
  • Details Updated
2022-05-15 09:05 Updated by: alienvalkyrie
  • Details Updated
評語

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

2022-05-16 23:56 Updated by: alienvalkyrie
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from to 修正
  • 類型 Update from 修補檔案 to Tasks

Attachment File List

No attachments

編輯

Please login to add comment to this ticket » 登入