Skip to content

Commit b637c29

Browse files
authored
Remove noqa comments and add __all__ to __init__.py files (#647)
1 parent 8b10a02 commit b637c29

File tree

43 files changed

+279
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+279
-73
lines changed

scripts/run_pytype.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ script_dir=$(dirname $0)
55
cd ${script_dir}/.. && \
66
pip install -e ".[async]" && \
77
pip install -e ".[adapter]" && \
8-
pip install "pytype==2022.4.26" && \
8+
pip install "pytype==2022.5.10" && \
99
pytype slack_bolt/

slack_bolt/__init__.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,26 @@
66
* The class representing a Bolt app: `slack_bolt.app.app`
77
""" # noqa: E501
88
# Don't add async module imports here
9-
from .app import App # noqa
10-
from .context import BoltContext # noqa
11-
from .context.ack import Ack # noqa
12-
from .context.respond import Respond # noqa
13-
from .context.say import Say # noqa
14-
from .kwargs_injection import Args # noqa
15-
from .listener import Listener # noqa
16-
from .listener_matcher import CustomListenerMatcher # noqa
17-
from .request import BoltRequest # noqa
18-
from .response import BoltResponse # noqa
9+
from .app import App
10+
from .context import BoltContext
11+
from .context.ack import Ack
12+
from .context.respond import Respond
13+
from .context.say import Say
14+
from .kwargs_injection import Args
15+
from .listener import Listener
16+
from .listener_matcher import CustomListenerMatcher
17+
from .request import BoltRequest
18+
from .response import BoltResponse
19+
20+
__all__ = [
21+
"App",
22+
"BoltContext",
23+
"Ack",
24+
"Respond",
25+
"Say",
26+
"Args",
27+
"Listener",
28+
"CustomListenerMatcher",
29+
"BoltRequest",
30+
"BoltResponse",
31+
]

slack_bolt/adapter/aiohttp/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@ async def to_aiohttp_response(bolt_resp: BoltResponse) -> web.Response:
3939
httponly=True,
4040
)
4141
return resp
42+
43+
44+
__all__ = [
45+
"to_bolt_request",
46+
"to_aiohttp_response",
47+
]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
from .handler import SlackRequestHandler # noqa: F401
1+
from .handler import SlackRequestHandler
2+
3+
__all__ = [
4+
"SlackRequestHandler",
5+
]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
from .handler import SlackRequestHandler # noqa: F401
1+
from .handler import SlackRequestHandler
2+
3+
__all__ = [
4+
"SlackRequestHandler",
5+
]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
from .handler import SlackRequestHandler # noqa: F401
1+
from .handler import SlackRequestHandler
2+
3+
__all__ = [
4+
"SlackRequestHandler",
5+
]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
from .handler import SlackRequestHandler # noqa: F401
1+
from .handler import SlackRequestHandler
2+
3+
__all__ = [
4+
"SlackRequestHandler",
5+
]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# Don't add async module imports here
2-
from .resource import SlackAppResource # noqa: F401
2+
from .resource import SlackAppResource
3+
4+
__all__ = [
5+
"SlackAppResource",
6+
]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# Don't add async module imports here
2-
from ..starlette.handler import SlackRequestHandler # noqa
2+
from ..starlette.handler import SlackRequestHandler
3+
4+
__all__ = [
5+
"SlackRequestHandler",
6+
]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
from ..starlette.async_handler import AsyncSlackRequestHandler # noqa
1+
from ..starlette.async_handler import AsyncSlackRequestHandler
2+
3+
__all__ = [
4+
"AsyncSlackRequestHandler",
5+
]

0 commit comments

Comments
 (0)