algolia / algoliasearch-client-python

⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
https://www.algolia.com/doc/api-client/getting-started/install/python/?language=python
MIT License
196 stars 67 forks source link

Add py.typed to setup.cfg #566

Open navignaw opened 4 months ago

navignaw commented 4 months ago
Q A
Bug fix? no
New feature? yes
BC breaks? no
Related Issue Fix #533
Need Doc update yes

Describe your change

According to PEP 561 python packages need to include a py.typed file in the distributed package so that downstream clients can leverage its type annotations.

What problem is this fixing?

By adding a py.typed file, this fixes an issue when running mypy in a downstream client:

algolia_search_service.py:4: error: Skipping analyzing "algoliasearch.search_client": module is installed, but missing library stubs or py.typed marker  [import-untyped]
navignaw commented 4 months ago

Getting some strange test failures that seem to be completely unrelated to this PR. @shortcuts do you mind taking a look (or routing to the correct person?) Thank you!