ethereum / web3.py

A python interface for interacting with the Ethereum blockchain and ecosystem.
http://web3py.readthedocs.io
MIT License
4.89k stars 1.67k forks source link

Explicitly export symbols via __all__ #3396

Closed ryanc-bs closed 1 month ago

ryanc-bs commented 1 month ago

What feature should we add?

Currently when importing symbols from package scope causes an error with mypy when running in strict mode:

from web3.providers import WebsocketProviderV2
# error: Module "web3.providers" does not explicitly export attribute "WebsocketProviderV2"  [attr-defined]

It would be nice if the package __init__.py files could include an all attribute to silence this error by explicitly marking the symbols as being re-exported in the new namespace.