Closed StephenWattam closed 4 years ago
hm, why does pytest fail :-(
Python 3.9 introduces this, which makes this PR somewhat out of date: https://www.python.org/dev/peps/pep-0585/
Going to close this PR so we don't have to undo this work for 3.9's new syntax
Type hints offer a way to catch errors caused by inconsistent use of typed variables, and offer better documentation for internal interfaces.
Not sure if they're worth using everywhere, but I think they might offer a good way to catch common bugs in the more complex bits of our code.
Not asking to merge this just yet, but see what you think. I did catch a couple of issues when adding this test. Typehints are widely used by "properly engineered" libraries and are definitely part of making the codebase robust.