任务单 #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 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:

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

任务单历史 (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 Fixed
  • 类型 Update from Patches to Tasks

Attachment File List

No attachments

编辑

Please login to add comment to this ticket » 登录名