-
Notifications
You must be signed in to change notification settings - Fork 853
Closed
Closed
Copy link
Labels
Version: 3xenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalitygood first issueweb-client
Milestone
Description
Kinda terrible title, dunno how to be super succinct with it. Apologies.
In PyCharm, given the file:
class MyBlock(InputBlock):
pass
Letting it auto-generate the import (OSX keyboard combo Option + Enter when over the invalid token InputBlock) will turn the file into:
from slack_sdk.models.blocks import InputBlock
class MyBlock(InputBlock):
pass
If I then save that file as testing.py and run mypy --strict --show-error-codes testing.py I'll get:
testing.py:1: error: Module "slack_sdk.models.blocks" does not explicitly export attribute "InputBlock"; implicit reexport disabled [attr-defined]
because the __init__ for the blocks module doesn't include an __all__ entry to re-export them as actually ostensibly public.
Ideally, the solution is to provide an __all__ here, so that anyone using mypy in strict mode doesn't have to "work around" the level of strictness for their project by doing something like the following in their mypy.ini (though naturally that solution does exist):
[mypy-slack_sdk.models.blocks]
implicit_reexport = True
Category
- slack_sdk.models (UI component builders)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Version: 3xenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalitygood first issueweb-client