Closed ddriddle closed 4 years ago
I like it. This is new and should remain a relatively small amount of code - and it's web facing - which is a good place to get the extra benefits of that kind of check. Let's go for it.
This is a fantastic idea.
@ddriddle Can you start us off with a PR that adds a GitHub actions hook that runs the test?
@edthedev can do.
@edthedev @mpitcel @zcarrington since this project is still in its infancy I think it would be wise to add static typing. Typing in Python 3 is optional and not enforced at runtime but does allow for static analysis using mypy that can catch bugs that would be hard to find otherwise. I wrote some Python 3 code that uses static typing here:
https://github.com/techservicesillinois/terraform-aws-cloudfront-lambda-basic-auth/blob/master/src/lambda/auth.py
The following link is a useful cheat sheet:
https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html
To actually enforce the typing you would add mypy to your Makefile something like this: