Re:Tests aren’t enough: Case study after adding type hints t...
by sseagull on Monday October 18, 2021 @01:29PM
(#28908088)
This is absolutely how I feel. I've mentioned previously taking over a project, and just not knowing the type of anything took me months to overcome.
Also, type hints really help your IDE, even catching errors before you even run tests.
There's also a visual cue that you are doing something wrong: If a function returns 4 levels of Union[Tuple[List[int]], Optional[str]........ Then you are doing something too complex and the function should be broken up.
Also, type hints really help your IDE, even catching errors before you even run tests.
There's also a visual cue that you are doing something wrong: If a function returns 4 levels of Union[Tuple[List[int]], Optional[str]........ Then you are doing something too complex and the function should be broken up.