terraform-python-testing-helper icon indicating copy to clipboard operation
terraform-python-testing-helper copied to clipboard

Add support for mypy

Open defreng opened this issue 1 year ago • 3 comments

The package currently seems to miss the py.typed marker to indicate support for mypy

external/terraform.py:5: error: Skipping analyzing "tftest": module is installed, but missing library stubs or py.typed marker  [import-untyped]
external/terraform.py:5: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

defreng avatar Dec 17 '23 13:12 defreng

Why would that be something we need? :) I'm not interested in adding types to tftest...

ludoo avatar Dec 17 '23 13:12 ludoo

Hey @ludoo

it's helpful even if you don't have types in this library... I.e. if I use mypy in my application which uses tftest, mypy could catch if I'm calling non-existing methods or methods with incorrect arguments on the TerraformTest class

also out of curiosity, why wouldn't you want to add types? :-)

defreng avatar Dec 17 '23 13:12 defreng

Thans. Would you care to send a PR?

ludoo avatar Dec 17 '23 13:12 ludoo