Ticket #48690

generate_packets.py: variable annotations

Eröffnet am: 2023-09-21 23:36 Letztes Update: 2023-09-23 18:34

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

Details

Depends on #44767. generate_packets.py has a few FIXMEs for places where workarounds are used to help static type checkers infer correct variable types. With Python 3.6, such type hints should be made explicit via variable annotations, rather than inferred. For instance variables, these should (along with their docstrings) be put directly inside the class, not inside the constructor.

Ticket-Verlauf (3/5 Historien)

2023-09-21 23:36 Aktualisiert von: alienvalkyrie
  • New Ticket "generate_packets.py: variable annotations" created
2023-09-22 00:07 Aktualisiert von: alienvalkyrie
  • Details Updated
Kommentar

Note that this is primarily about annotating instance variables (fields of objects). There might be a few places where local variables need type hints as well (specifically for element types of initially empty collections), but local variables don't need to, as a rule, be annotated when inference works fine.

2023-09-22 01:50 Aktualisiert von: alienvalkyrie
  • Lösung Update from Keine to Accepted
2023-09-23 18:34 Aktualisiert von: alienvalkyrie
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden