mockito-python icon indicating copy to clipboard operation
mockito-python copied to clipboard

Mypy integration

Open mazinesy opened this issue 2 years ago • 3 comments

Related: https://github.com/kaste/mockito-python/issues/27

👋 We currently are using mockito-python but checks are failing when running mypy.

Here's the output:

error: Skipping analyzing "mockito": module is installed, but missing library stubs or py.typed marker
note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

Is there an easy to make this work ?

mazinesy avatar Jul 28 '22 20:07 mazinesy

The easy way is to ignore mockito, e.g. something like this in mypy.ini.

[mypy-mockito]
ignore_missing_imports = True

Full typing support would be some significant work. What do you actually expect here?

kaste avatar Jul 28 '22 20:07 kaste

Yep, that's exactly what we currently are doing.

What do you actually expect here?

Nothing much really. It just is an issue to track the typing as it is becoming more and more popular.

mazinesy avatar Jul 29 '22 13:07 mazinesy

Funny enough, we actually run mypy here as a GitHub action.

https://github.com/kaste/mockito-python/blob/9c56559cd376d131e2db3510ad165142250272f2/.github/workflows/test-lint-go.yml#L64-L78

kaste avatar Aug 04 '22 23:08 kaste