Ticket #44763

generate_packets.py: Pylance "(possibly) unbound" warnings

Open Date: 2022-06-07 02:41 Last Update: 2022-06-08 20:21

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

Details

Part of #43927. Pylance gives a number of warnings for variables that might be unbound. They can't really be unbound, as far as I can tell, but clean them up anyway.

  • array_size_u in Field.get_put_real(): Probably best to define fallback error values in the branches where it isn't currently defined
  • delta_header2 in Variant.get_send(): Move the use up to the spot where it's actually needed
  • v in the code to generate the else-branches in get_packet_handlers_fill_capability(): Use the Packet instead of the Variant

Ticket History (3/4 Histories)

2022-06-07 02:41 Updated by: alienvalkyrie
  • New Ticket "generate_packets.py: Pylance "(possibly) unbound" warnings" created
2022-06-07 04:57 Updated by: alienvalkyrie
  • Resolution Update from None to Accepted
2022-06-08 20:21 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