gtalarico / pyairtable

Python Api Client for Airtable
https://pyairtable.readthedocs.io
MIT License
786 stars 139 forks source link

mypy error: Module "pyairtable" does not explicitly export attribute "Api"; implicit reexport disabled #202

Closed noamraph closed 1 year ago

noamraph commented 2 years ago

I get this when running mypy --string on my code:

test/init_test.py:16: error: Module "pyairtable" does not explicitly export attribute "Api"; implicit reexport disabled
test/init_test.py:16: error: Module "pyairtable" does not explicitly export attribute "Table"; implicit reexport disabled

The relevant line is just:

from pyairtable import Api, Table

This is how pymongo solved the same issue: https://jira.mongodb.org/browse/PYTHON-3311

gtalarico commented 2 years ago

Most common cause for this is having name clashes with other files or packages. Do you have other files or packages named pyairtable?

mesozoic commented 1 year ago

This is probably due to missing __all__ variables in certain places.

We don't plan to fully support mypy --strict until the 2.0.0 release (see roadmap). Until then you can disable those specific errors with mypy --strict --implicit-reexport (read more here).