Ticket #44575

generate_packets.py: phase out use of vars() in formatting

Open Date: 2022-05-13 05:20 Last Update: 2022-05-16 21:19

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

Part of #43927. Using vars() makes it impossible for IDEs or static code checking tools to reason about usage of variables. We should replace uses of vars() with a more robust formatting solution.

Since f-strings are only available from Python 3.6 onward, we'll have to fall back on the "...".format(foo = foo, bar = bar) idiom for now.

Ticket History (3/5 Histories)

2022-05-13 05:20 Updated by: alienvalkyrie
  • New Ticket "generate_packets.py: phase out use of vars() in formatting" created
2022-05-13 05:31 Updated by: alienvalkyrie
Comment

Variant.get_send() and Variant.get_receive() have their own idiosyncratic formatting mechanisms and will be dealt with separately in #44577

(Edited, 2022-05-13 05:34 Updated by: alienvalkyrie)
2022-05-13 05:46 Updated by: alienvalkyrie
  • Resolution Update from None to Accepted
Comment

Depends on #44563 and #44576

2022-05-16 21:19 Updated by: alienvalkyrie
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login