Skip to content

Commit 410b245

Browse files
WilliamBergaminClaude
andcommitted
fix: correct docstring content defects left by the pydocstyle sweep
The ruff pydocstyle (D) reformatting enforced docstring shape but not content, leaving six correctness/consistency defects: - falcon/resource.py: reformatting turned the usage snippet into an invalid example (`app = App().`); restore a proper summary + clean code - socket_mode base_handler.py / async_base_handler.py: summary split mid sentence left a dangling lowercase fragment; merge it back - __init__.py: "features.Read" was missing a space (shown on PyPI) - async_app.py dialog_cancellation: summary wrongly said dialog_submission - app.py / async_app.py step(): de-indent the orphaned Deprecated block - async_authorize.py: add backticks around `authorize` to mirror the sync CallableAuthorize docstring Docstring-only; no behavior change. Sync/async pairs kept mirrored. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 33e6b59 commit 410b245

7 files changed

Lines changed: 12 additions & 13 deletions

File tree

slack_bolt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""A Python framework to build Slack apps in a flash with the latest platform features.Read the [getting started guide](https://docs.slack.dev/tools/bolt-python/creating-an-app) and look at our [code examples](https://github.com/slackapi/bolt-python/tree/main/examples) to learn how to build apps using Bolt.
1+
"""A Python framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://docs.slack.dev/tools/bolt-python/creating-an-app) and look at our [code examples](https://github.com/slackapi/bolt-python/tree/main/examples) to learn how to build apps using Bolt.
22
33
* Website: https://docs.slack.dev/tools/bolt-python/
44
* GitHub repository: https://github.com/slackapi/bolt-python

slack_bolt/adapter/falcon/resource.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212

1313
class SlackAppResource:
14-
"""from slack_bolt import App.
14+
"""For use with WSGI Falcon Apps.
1515
16-
app = App().
16+
from slack_bolt import App
17+
app = App()
1718
1819
import falcon
1920
api = application = falcon.API()

slack_bolt/adapter/socket_mode/async_base_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ async def close_async(self):
3838
await self.client.close()
3939

4040
async def start_async(self):
41-
"""Establishes a new connection and then starts infinite sleep.
41+
"""Establishes a new connection and then starts infinite sleep to prevent the termination of this process.
4242
43-
to prevent the termination of this process.
4443
If you don't want to have the sleep, use `#connect()` method instead.
4544
"""
4645
await self.connect_async()

slack_bolt/adapter/socket_mode/base_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ def close(self):
4141
self.client.close()
4242

4343
def start(self):
44-
"""Establishes a new connection and then blocks the current thread.
44+
"""Establishes a new connection and then blocks the current thread to prevent the termination of this process.
4545
46-
to prevent the termination of this process.
4746
If you don't want to block the current thread, use `#connect()` method instead.
4847
"""
4948
self.connect()

slack_bolt/app/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,8 @@ def step(
720720
):
721721
"""Deprecated: register a new step from app listener.
722722
723-
Steps from apps for legacy workflows are now deprecated.
724-
Use new custom steps: https://docs.slack.dev/workflows/workflow-steps/
723+
Steps from apps for legacy workflows are now deprecated.
724+
Use new custom steps: https://docs.slack.dev/workflows/workflow-steps/
725725
726726
Registers a new step from app listener.
727727

slack_bolt/app/async_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,8 @@ def step(
745745
):
746746
"""Deprecated: register a new step from app listener.
747747
748-
Steps from apps for legacy workflows are now deprecated.
749-
Use new custom steps: https://docs.slack.dev/workflows/workflow-steps/
748+
Steps from apps for legacy workflows are now deprecated.
749+
Use new custom steps: https://docs.slack.dev/workflows/workflow-steps/
750750
751751
Registers a new step from app listener.
752752
@@ -1225,7 +1225,7 @@ def dialog_cancellation(
12251225
matchers: Optional[Sequence[Callable[..., Awaitable[bool]]]] = None,
12261226
middleware: Optional[Sequence[Union[Callable, AsyncMiddleware]]] = None,
12271227
) -> Callable[..., Optional[Callable[..., Awaitable[Optional[BoltResponse]]]]]:
1228-
"""Registers a new `dialog_submission` listener.
1228+
"""Registers a new `dialog_cancellation` listener.
12291229
12301230
Refer to https://docs.slack.dev/legacy/legacy-dialogs/ for details.
12311231
"""

slack_bolt/authorization/async_authorize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async def __call__(
3838

3939

4040
class AsyncCallableAuthorize(AsyncAuthorize):
41-
"""When you pass the authorize argument in AsyncApp constructor, this authorize implementation will be used."""
41+
"""When you pass the `authorize` argument in AsyncApp constructor, this `authorize` implementation will be used."""
4242

4343
def __init__(self, *, logger: Logger, func: Callable[..., Awaitable[AuthorizeResult]]):
4444
self.logger = logger

0 commit comments

Comments
 (0)