You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
Currently, in the v14 branch we for e.g do: from telegram import error. But if a user does from telegram import *, it does not import the public submodule error, when it should.
PEP-8 says that documented interfaces are considered public and "To better support introspection, modules should explicitly declare the names in their public API using the __all__ attribute.".
Additionally, PEP-8 also says that __all__ should be placed above the imports.
Describe the solution you'd like
Import and add public submodules to __all__, place __all__ above imports.
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
Currently, in the v14 branch we for e.g do:
from telegram import error
. But if a user doesfrom telegram import *
, it does not import the public submoduleerror
, when it should.PEP-8 says that documented interfaces are considered public and
"To better support introspection, modules should explicitly declare the names in their public API using the __all__ attribute."
.Additionally, PEP-8 also says that
__all__
should be placed above the imports.Describe the solution you'd like
Import and add public submodules to
__all__
, place__all__
above imports.Additional context
Original discussion: #2759 (comment)
The text was updated successfully, but these errors were encountered: