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
Having read #7743, I now see the intention. Would there be a possibility of renaming discord.ext.commands.bot to discord.ext.commands._bot to reflect the directory of sub-packages being private?
This would prevent confusion and bring consistency with PEP 561, "...all [py.typed packages'] sub-packages MUST support type checking...".
Summary
Types are not correctly re-exported from
discord.ext.commands.bot
.Reproduction Steps
Attempt to import any types specified in the
if TYPE_CHECKING:
block.Minimal Reproducible Code
Expected Results
Types used in the public namespace of a py.typed package should all be exported.
Attempting to provide type information for any subclass of a
discord.ext.commands.bot
class cannot correctly inherit type information.Actual Results
Types not re-exported.
Intents
N/A
System Information
Checklist
Additional Context
There is a consensus in the typing community that imported private symbols should be explicitly exported. For example,
from discord.ext.commands._types import BotT as BotT
While the
as ...
seems redundant, the lack of an export keyword/construction in Python requires it to maintain consistent namespace standards.The text was updated successfully, but these errors were encountered: