-
-
Notifications
You must be signed in to change notification settings - Fork 718
Description
Detailed description of the issue
NVDA python code is missing a lot of type information.
Some of this could be easily auto-generated and human reviewed.
Potential methods
MonkeyType
https://github.com/Instagram/MonkeyType
MonkeyType is a library which generates type information based on runtime behaviour.
After configuring, we would simply run NVDA with MonkeyType watching. It would generate type information based on what data functions received. We would then review and commit type annotations generated from this data gathering.
Discussion on usage in a similar use case: https://discuss.python.org/t/how-does-monkeytype-affect-performance-and-stability/40087/13
Note, I've used this before and you must take the results with a grain of salt. I think it saves a lot of time though compared to hand writing types from scratch
use AI
Use AI tooling to generate type information. AI might be able to gain more contextual information than analysing at run time. It's more prone to hallucination though, at least at runtime we are guaranteed to get a subset of the correct type information
Why are the other templates not appropriate in this case?
This is a code refactor task not a user facing issue