You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, not all functions and classes in the codebase have type hints. In #255 and #256, I used an LLM to generate type hints, but the process was inefficient and cumbersome, as it required feeding each function individually (at least at that time, it does not handle long code very well). This approach makes it challenging to regenerate or update type hints when changes occur.
To improve this:
It would be nice to have them automatically generated. We should use the modern syntax such as int | list[int] | None, as suggested in Add type hints to the circuit module #255. @gadhvirushiraj found MonkeyType, which will generate type hints based on the testing code.
Those type hints added always need some post-processing. And we may find some small bugs while handling them. Therefore it is best to do this module by module, allowing for manageable PRs and manual adjustments.
The text was updated successfully, but these errors were encountered:
Currently, not all functions and classes in the codebase have type hints. In #255 and #256, I used an LLM to generate type hints, but the process was inefficient and cumbersome, as it required feeding each function individually (at least at that time, it does not handle long code very well). This approach makes it challenging to regenerate or update type hints when changes occur.
To improve this:
int | list[int] | None
, as suggested in Add type hints to the circuit module #255. @gadhvirushiraj found MonkeyType, which will generate type hints based on the testing code.The text was updated successfully, but these errors were encountered: