Add type annotations & minor groundwork for #19
This MR adds type annotations to the codebase, and checks them in CI via tox. It also adds a poe task (check-code-types:local) to run mypy from the project's dependencies.
It also makes two minor changes:
- Resolves a
FIXMEinucam_faas/__init__.pyby logging the exception traceback when an unhandled error occurs - Fixes a type error in the examples that was surfaced by adding types. (An example was making a call to an @raw_event handler with a dict instead of a byte string)
The context to this is that I was going through this codebase mid last week, and adding type annotations as a way to read through and understand the project, in preparation for tackling #18. In the process of doing that I came to understand the issues described in #19, and this MR is laying some groundwork that will be used in the implementation of #19.