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
I think this type of work would be useful. Typing is a useful feature for ensuring code accuracy. If you submitted a PR, I would review it and try to push it through.
Context
WHEN
I use rdk to create a rule rule. It generates a few python files for the rule
I WANT TO
The generated code to have types annotations
SO THAT
I could benefits from static type checker like mypy or other linter to guide the development of my rules.
Proposed solutions
Solution 1: Add mypy stub files in the template for every suppport python runtime version
The mypy stub file will provide all type annotations for the provided helpers and boilerplate code.
rdk/ └── template/ └── runtime/ └── pythonX/ ├── rule_code.py ├── rule_test.py └── rule_code.pyi # <- Mypy Stub file
Solution 2: Add type annotation to the provided template
Here is an example using libraries:
I coud help implement this but I need to comment to make sure I'm on the right path.
Thanks in advance
Regards
The text was updated successfully, but these errors were encountered: