pnuckowski / aioresponses

Aioresponses is a helper for mock/fake web requests in python aiohttp package.
MIT License
518 stars 86 forks source link

`py.typed` not included in package build #206

Closed hf-kklein closed 2 years ago

hf-kklein commented 2 years ago

Relates to #191 where the py.typed file has been introduced.

Symptom

when using airesponses mypy complains:

error: Cannot find implementation or library stub for module named "aioresponses" [import]

Reason

Although the py.typed file has been added, the file alone is not enough to make this pacakge PEP561 compatible. The mypy docs state:

packages that supply type information via type comments or annotations in the code should put a py.typed file in their package directory.

This has been done in #193 ✅

But the mypy documentation also says:

you may also need to modify the inclusion rules in your MANIFEST.in

How to reproduce

hf-kklein commented 2 years ago

I tried to fix it in #207. When running python setup.py build locally, the py.typed file is included.