Closed jdkandersson closed 1 year ago
Type hints are helpful:
- When editing code as many code editors will use type hints for auto completion and indicating problems
- Make it easier to understand the code
- Can use
mypy
to statically check whether all types are correctly being used, e.g., for function parametersThere are a range of type hint levels we could adopt:
- No type hints
- Some type hints, e.g., for key functions and class/ instance variables
- Use type hints extensively except where it is impractical to do so
To gain the maximum advantage of type hints and for code correctness to enhance stability of charms, I would recommend we go for (3).
+1 for option (3)!
Type hints are helpful:
mypy
to statically check whether all types are correctly being used, e.g., for function parametersThere are a range of type hint levels we could adopt:
To gain the maximum advantage of type hints and for code correctness to enhance stability of charms, I would recommend we go for (3).