Skip to content

Commit

Permalink
Apply black code formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Sep 5, 2024
1 parent 7ab47a4 commit bf64edf
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions slack_bolt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* GitHub repository: https://github.com/slackapi/bolt-python
* The class representing a Bolt app: `slack_bolt.app.app`
""" # noqa: E501

# Don't add async module imports here
from .app import App
from .context import BoltContext
Expand Down
1 change: 1 addition & 0 deletions slack_bolt/adapter/socket_mode/async_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Default implementation is the aiohttp-based one."""

from .aiohttp import AsyncSocketModeHandler

__all__ = [
Expand Down
1 change: 1 addition & 0 deletions slack_bolt/async_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ async def command(ack, body, respond):
Refer to `slack_bolt.app.async_app` for more details.
""" # noqa: E501

from .app.async_app import AsyncApp
from .context.ack.async_ack import AsyncAck
from .context.async_context import AsyncBoltContext
Expand Down
1 change: 1 addition & 0 deletions slack_bolt/authorization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Refer to https://slack.dev/bolt-python/concepts#authorization for details.
"""

from .authorize_result import AuthorizeResult

__all__ = [
Expand Down
8 changes: 2 additions & 6 deletions slack_bolt/context/async_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ async def handle_button_clicks(context):
Callable `complete()` function
"""
if "complete" not in self:
self["complete"] = AsyncComplete(
client=self.client, function_execution_id=self.function_execution_id
)
self["complete"] = AsyncComplete(client=self.client, function_execution_id=self.function_execution_id)
return self["complete"]

@property
Expand All @@ -181,7 +179,5 @@ async def handle_button_clicks(context):
Callable `fail()` function
"""
if "fail" not in self:
self["fail"] = AsyncFail(
client=self.client, function_execution_id=self.function_execution_id
)
self["fail"] = AsyncFail(client=self.client, function_execution_id=self.function_execution_id)
return self["fail"]
8 changes: 2 additions & 6 deletions slack_bolt/context/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ def handle_button_clicks(context):
Callable `complete()` function
"""
if "complete" not in self:
self["complete"] = Complete(
client=self.client, function_execution_id=self.function_execution_id
)
self["complete"] = Complete(client=self.client, function_execution_id=self.function_execution_id)
return self["complete"]

@property
Expand All @@ -182,7 +180,5 @@ def handle_button_clicks(context):
Callable `fail()` function
"""
if "fail" not in self:
self["fail"] = Fail(
client=self.client, function_execution_id=self.function_execution_id
)
self["fail"] = Fail(client=self.client, function_execution_id=self.function_execution_id)
return self["fail"]
1 change: 1 addition & 0 deletions slack_bolt/error/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Bolt specific error types."""

from typing import Optional, Union


Expand Down
2 changes: 1 addition & 1 deletion slack_bolt/kwargs_injection/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(
# the naming conflict with the built-in one affects
# only the internals of this method
next: Callable[[], None],
**kwargs # noqa
**kwargs, # noqa
):
self.logger: logging.Logger = logger
self.client: WebClient = client
Expand Down
2 changes: 1 addition & 1 deletion slack_bolt/kwargs_injection/async_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(
complete: AsyncComplete,
fail: AsyncFail,
next: Callable[[], Awaitable[None]],
**kwargs # noqa
**kwargs, # noqa
):
self.logger: Logger = logger
self.client: AsyncWebClient = client
Expand Down
1 change: 1 addition & 0 deletions slack_bolt/lazy_listener/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def run_long_process(respond, body):
Refer to https://slack.dev/bolt-python/concepts#lazy-listeners for more details.
"""

# Don't add async module imports here
from .runner import LazyListenerRunner
from .thread_runner import ThreadLazyListenerRunner
Expand Down
1 change: 1 addition & 0 deletions slack_bolt/listener_matcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A listener matcher function returns bool value instead of `next()` method invocation inside.
This interface enables developers to utilize simple predicate functions for additional listener conditions.
"""

# Don't add async module imports here
from .custom_listener_matcher import CustomListenerMatcher
from .listener_matcher import ListenerMatcher
Expand Down
1 change: 1 addition & 0 deletions slack_bolt/request/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Refer to https://api.slack.com/apis/connections for the two types of connections.
This interface encapsulates the difference between the two.
"""

# Don't add async module imports here
from .request import BoltRequest

Expand Down
2 changes: 1 addition & 1 deletion tests/scenario_tests_async/test_events_org_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def async_find_installation(
enterprise_id: Optional[str],
team_id: Optional[str],
user_id: Optional[str] = None,
is_enterprise_install: Optional[bool] = False
is_enterprise_install: Optional[bool] = False,
) -> Optional[Installation]:
assert enterprise_id == "E111"
assert team_id is None
Expand Down

0 comments on commit bf64edf

Please sign in to comment.