minio / minio-py

MinIO Client SDK for Python
https://docs.min.io/docs/python-client-quickstart-guide.html
Apache License 2.0
851 stars 325 forks source link

Add import aliases to make mypy happy #1383

Closed a1d4r closed 10 months ago

a1d4r commented 10 months ago

Mypy with strict mode enabled gives the following error on version 7.2.2:

error: Module "minio" does not explicitly export attribute "Minio"  [attr-defined]

The error is caused by rule --no-implicit-reexport. There are two ways how to fix it: either define __all__ in __init__.py or use import aliases so that other modules can import it. In this PR I added aliases for all imports in __init__.py.