> 4. type-hints are ok for very very big projects.
Great for smaller ones too! I type annotate every function, even
def parse_args() -> argparse.Namespace:
pass
at the top of simple scripts. With a good IDE (VS Code fits here too), the extra language lookups/insight you get are awesome. Command+mouse_hover gives me a great bit of information about args passed into the function if I annotate the inputs.
Great for smaller ones too! I type annotate every function, even
at the top of simple scripts. With a good IDE (VS Code fits here too), the extra language lookups/insight you get are awesome. Command+mouse_hover gives me a great bit of information about args passed into the function if I annotate the inputs.