3 ms·
My issue with mypy is that I would like it to verify that I'm passing the right types into functions from my dependencies. For example, I do a lot of scripting
by robrtsql 8y ago
My issue with mypy is that I would like it to verify that I'm passing the right types into functions from my dependencies. For example, I do a lot of scripting with Python and boto3 to interact with AWS, and my scripts often fail the first time because I misread the field name or structure of a JSON object that goes into or comes from the API. It makes me wish I was using Java or Go, because at least then the compiler would have told me it was wrong.
I'm not sure if a solution to this exists yet. It seems like it's up to the dependency to adopt mypy as well?
- j88439h84 8y agoYeah I think so. There is monkeytype which can infer the types from test runs and insert them into source, so its quite easy to add annotations.