Skip to content

Commit

Permalink
version 1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Mar 18, 2022
1 parent eda5574 commit 89883bd
Show file tree
Hide file tree
Showing 29 changed files with 1,379 additions and 471 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.chalice_handler</co
def __init__(self, app: App, chalice: Chalice, lambda_client: Optional[BaseClient] = None): # type: ignore
self.app = app
self.chalice = chalice
self.logger = get_bolt_app_logger(app.name, ChaliceSlackRequestHandler)
self.logger = get_bolt_app_logger(
app.name, ChaliceSlackRequestHandler, app.logger
)

if getenv(&#34;AWS_CHALICE_CLI_MODE&#34;) == &#34;true&#34; and lambda_client is None:
try:
Expand Down Expand Up @@ -221,7 +223,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
def __init__(self, app: App, chalice: Chalice, lambda_client: Optional[BaseClient] = None): # type: ignore
self.app = app
self.chalice = chalice
self.logger = get_bolt_app_logger(app.name, ChaliceSlackRequestHandler)
self.logger = get_bolt_app_logger(
app.name, ChaliceSlackRequestHandler, app.logger
)

if getenv(&#34;AWS_CHALICE_CLI_MODE&#34;) == &#34;true&#34; and lambda_client is None:
try:
Expand Down
4 changes: 2 additions & 2 deletions docs/api-docs/slack_bolt/adapter/aws_lambda/handler.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda.handler</code></h1>
class SlackRequestHandler:
def __init__(self, app: App): # type: ignore
self.app = app
self.logger = get_bolt_app_logger(app.name, SlackRequestHandler)
self.logger = get_bolt_app_logger(app.name, SlackRequestHandler, app.logger)
self.app.listener_runner.lazy_listener_runner = LambdaLazyListenerRunner(
self.logger
)
Expand Down Expand Up @@ -228,7 +228,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<pre><code class="python">class SlackRequestHandler:
def __init__(self, app: App): # type: ignore
self.app = app
self.logger = get_bolt_app_logger(app.name, SlackRequestHandler)
self.logger = get_bolt_app_logger(app.name, SlackRequestHandler, app.logger)
self.app.listener_runner.lazy_listener_runner = LambdaLazyListenerRunner(
self.logger
)
Expand Down
337 changes: 256 additions & 81 deletions docs/api-docs/slack_bolt/app/app.html

Large diffs are not rendered by default.

336 changes: 255 additions & 81 deletions docs/api-docs/slack_bolt/app/async_app.html

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions docs/api-docs/slack_bolt/listener/async_listener.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ <h1 class="title">Module <code>slack_bolt.listener.async_listener</code></h1>
matchers: Sequence[AsyncListenerMatcher],
middleware: Sequence[AsyncMiddleware],
auto_acknowledgement: bool = False,
base_logger: Optional[Logger] = None,
):
self.app_name = app_name
self.ack_function = ack_function
Expand All @@ -137,7 +138,7 @@ <h1 class="title">Module <code>slack_bolt.listener.async_listener</code></h1>
self.middleware = middleware
self.auto_acknowledgement = auto_acknowledgement
self.arg_names = inspect.getfullargspec(ack_function).args
self.logger = get_bolt_app_logger(app_name, self.ack_function)
self.logger = get_bolt_app_logger(app_name, self.ack_function, base_logger)

async def run_ack_function(
self,
Expand Down Expand Up @@ -174,7 +175,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="slack_bolt.listener.async_listener.AsyncCustomListener"><code class="flex name class">
<span>class <span class="ident">AsyncCustomListener</span></span>
<span>(</span><span>*, app_name: str, ack_function: Callable[..., Awaitable[Optional[<a title="slack_bolt.response.response.BoltResponse" href="../response/response.html#slack_bolt.response.response.BoltResponse">BoltResponse</a>]]], lazy_functions: Sequence[Callable[..., Awaitable[None]]], matchers: Sequence[<a title="slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher" href="../listener_matcher/async_listener_matcher.html#slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher">AsyncListenerMatcher</a>], middleware: Sequence[<a title="slack_bolt.middleware.async_middleware.AsyncMiddleware" href="../middleware/async_middleware.html#slack_bolt.middleware.async_middleware.AsyncMiddleware">AsyncMiddleware</a>], auto_acknowledgement: bool = False)</span>
<span>(</span><span>*, app_name: str, ack_function: Callable[..., Awaitable[Optional[<a title="slack_bolt.response.response.BoltResponse" href="../response/response.html#slack_bolt.response.response.BoltResponse">BoltResponse</a>]]], lazy_functions: Sequence[Callable[..., Awaitable[None]]], matchers: Sequence[<a title="slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher" href="../listener_matcher/async_listener_matcher.html#slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher">AsyncListenerMatcher</a>], middleware: Sequence[<a title="slack_bolt.middleware.async_middleware.AsyncMiddleware" href="../middleware/async_middleware.html#slack_bolt.middleware.async_middleware.AsyncMiddleware">AsyncMiddleware</a>], auto_acknowledgement: bool = False, base_logger: Optional[logging.Logger] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -201,6 +202,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
matchers: Sequence[AsyncListenerMatcher],
middleware: Sequence[AsyncMiddleware],
auto_acknowledgement: bool = False,
base_logger: Optional[Logger] = None,
):
self.app_name = app_name
self.ack_function = ack_function
Expand All @@ -209,7 +211,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
self.middleware = middleware
self.auto_acknowledgement = auto_acknowledgement
self.arg_names = inspect.getfullargspec(ack_function).args
self.logger = get_bolt_app_logger(app_name, self.ack_function)
self.logger = get_bolt_app_logger(app_name, self.ack_function, base_logger)

async def run_ack_function(
self,
Expand Down Expand Up @@ -307,7 +309,7 @@ <h2 id="returns">Returns</h2>
</dd>
<dt id="slack_bolt.listener.async_listener.AsyncCustomListener"><code class="flex name class">
<span>class <span class="ident">cls</span></span>
<span>(</span><span>*, app_name: str, ack_function: Callable[..., Awaitable[Optional[<a title="slack_bolt.response.response.BoltResponse" href="../response/response.html#slack_bolt.response.response.BoltResponse">BoltResponse</a>]]], lazy_functions: Sequence[Callable[..., Awaitable[None]]], matchers: Sequence[<a title="slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher" href="../listener_matcher/async_listener_matcher.html#slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher">AsyncListenerMatcher</a>], middleware: Sequence[<a title="slack_bolt.middleware.async_middleware.AsyncMiddleware" href="../middleware/async_middleware.html#slack_bolt.middleware.async_middleware.AsyncMiddleware">AsyncMiddleware</a>], auto_acknowledgement: bool = False)</span>
<span>(</span><span>*, app_name: str, ack_function: Callable[..., Awaitable[Optional[<a title="slack_bolt.response.response.BoltResponse" href="../response/response.html#slack_bolt.response.response.BoltResponse">BoltResponse</a>]]], lazy_functions: Sequence[Callable[..., Awaitable[None]]], matchers: Sequence[<a title="slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher" href="../listener_matcher/async_listener_matcher.html#slack_bolt.listener_matcher.async_listener_matcher.AsyncListenerMatcher">AsyncListenerMatcher</a>], middleware: Sequence[<a title="slack_bolt.middleware.async_middleware.AsyncMiddleware" href="../middleware/async_middleware.html#slack_bolt.middleware.async_middleware.AsyncMiddleware">AsyncMiddleware</a>], auto_acknowledgement: bool = False, base_logger: Optional[logging.Logger] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -334,6 +336,7 @@ <h2 id="returns">Returns</h2>
matchers: Sequence[AsyncListenerMatcher],
middleware: Sequence[AsyncMiddleware],
auto_acknowledgement: bool = False,
base_logger: Optional[Logger] = None,
):
self.app_name = app_name
self.ack_function = ack_function
Expand All @@ -342,7 +345,7 @@ <h2 id="returns">Returns</h2>
self.middleware = middleware
self.auto_acknowledgement = auto_acknowledgement
self.arg_names = inspect.getfullargspec(ack_function).args
self.logger = get_bolt_app_logger(app_name, self.ack_function)
self.logger = get_bolt_app_logger(app_name, self.ack_function, base_logger)

async def run_ack_function(
self,
Expand Down
8 changes: 5 additions & 3 deletions docs/api-docs/slack_bolt/listener/custom_listener.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ <h1 class="title">Module <code>slack_bolt.listener.custom_listener</code></h1>
matchers: Sequence[ListenerMatcher],
middleware: Sequence[Middleware], # type: ignore
auto_acknowledgement: bool = False,
base_logger: Optional[Logger] = None,
):
self.app_name = app_name
self.ack_function = ack_function
Expand All @@ -66,7 +67,7 @@ <h1 class="title">Module <code>slack_bolt.listener.custom_listener</code></h1>
self.middleware = middleware
self.auto_acknowledgement = auto_acknowledgement
self.arg_names = inspect.getfullargspec(ack_function).args
self.logger = get_bolt_app_logger(app_name, self.ack_function)
self.logger = get_bolt_app_logger(app_name, self.ack_function, base_logger)

def run_ack_function(
self,
Expand Down Expand Up @@ -96,7 +97,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="slack_bolt.listener.custom_listener.CustomListener"><code class="flex name class">
<span>class <span class="ident">CustomListener</span></span>
<span>(</span><span>*, app_name: str, ack_function: Callable[..., Optional[<a title="slack_bolt.response.response.BoltResponse" href="../response/response.html#slack_bolt.response.response.BoltResponse">BoltResponse</a>]], lazy_functions: Sequence[Callable[..., None]], matchers: Sequence[<a title="slack_bolt.listener_matcher.listener_matcher.ListenerMatcher" href="../listener_matcher/listener_matcher.html#slack_bolt.listener_matcher.listener_matcher.ListenerMatcher">ListenerMatcher</a>], middleware: Sequence[<a title="slack_bolt.middleware.middleware.Middleware" href="../middleware/middleware.html#slack_bolt.middleware.middleware.Middleware">Middleware</a>], auto_acknowledgement: bool = False)</span>
<span>(</span><span>*, app_name: str, ack_function: Callable[..., Optional[<a title="slack_bolt.response.response.BoltResponse" href="../response/response.html#slack_bolt.response.response.BoltResponse">BoltResponse</a>]], lazy_functions: Sequence[Callable[..., None]], matchers: Sequence[<a title="slack_bolt.listener_matcher.listener_matcher.ListenerMatcher" href="../listener_matcher/listener_matcher.html#slack_bolt.listener_matcher.listener_matcher.ListenerMatcher">ListenerMatcher</a>], middleware: Sequence[<a title="slack_bolt.middleware.middleware.Middleware" href="../middleware/middleware.html#slack_bolt.middleware.middleware.Middleware">Middleware</a>], auto_acknowledgement: bool = False, base_logger: Optional[logging.Logger] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -123,6 +124,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
matchers: Sequence[ListenerMatcher],
middleware: Sequence[Middleware], # type: ignore
auto_acknowledgement: bool = False,
base_logger: Optional[Logger] = None,
):
self.app_name = app_name
self.ack_function = ack_function
Expand All @@ -131,7 +133,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
self.middleware = middleware
self.auto_acknowledgement = auto_acknowledgement
self.arg_names = inspect.getfullargspec(ack_function).args
self.logger = get_bolt_app_logger(app_name, self.ack_function)
self.logger = get_bolt_app_logger(app_name, self.ack_function, base_logger)

def run_ack_function(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="slack_bolt.listener_matcher.async_builtins.AsyncBuiltinListenerMatcher"><code class="flex name class">
<span>class <span class="ident">AsyncBuiltinListenerMatcher</span></span>
<span>(</span><span>*, func: Callable[..., Union[bool, Awaitable[bool]]])</span>
<span>(</span><span>*, func: Callable[..., Union[bool, Awaitable[bool]]], base_logger: Optional[logging.Logger] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1 class="title">Module <code>slack_bolt.listener_matcher.async_listener_matche

import inspect
from logging import Logger
from typing import Callable, Awaitable, Sequence
from typing import Callable, Awaitable, Sequence, Optional

from slack_bolt.kwargs_injection.async_utils import build_async_required_kwargs
from slack_bolt.logger import get_bolt_app_logger
Expand All @@ -63,11 +63,17 @@ <h1 class="title">Module <code>slack_bolt.listener_matcher.async_listener_matche
arg_names: Sequence[str]
logger: Logger

def __init__(self, *, app_name: str, func: Callable[..., Awaitable[bool]]):
def __init__(
self,
*,
app_name: str,
func: Callable[..., Awaitable[bool]],
base_logger: Optional[Logger] = None
):
self.app_name = app_name
self.func = func
self.arg_names = inspect.getfullargspec(func).args
self.logger = get_bolt_app_logger(self.app_name, self.func)
self.logger = get_bolt_app_logger(self.app_name, self.func, base_logger)

async def async_matches(self, req: AsyncBoltRequest, resp: BoltResponse) -&gt; bool:
return await self.func(
Expand Down Expand Up @@ -99,7 +105,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="slack_bolt.listener_matcher.async_listener_matcher.AsyncCustomListenerMatcher"><code class="flex name class">
<span>class <span class="ident">AsyncCustomListenerMatcher</span></span>
<span>(</span><span>*, app_name: str, func: Callable[..., Awaitable[bool]])</span>
<span>(</span><span>*, app_name: str, func: Callable[..., Awaitable[bool]], base_logger: Optional[logging.Logger] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -113,11 +119,17 @@ <h2 class="section-title" id="header-classes">Classes</h2>
arg_names: Sequence[str]
logger: Logger

def __init__(self, *, app_name: str, func: Callable[..., Awaitable[bool]]):
def __init__(
self,
*,
app_name: str,
func: Callable[..., Awaitable[bool]],
base_logger: Optional[Logger] = None
):
self.app_name = app_name
self.func = func
self.arg_names = inspect.getfullargspec(func).args
self.logger = get_bolt_app_logger(self.app_name, self.func)
self.logger = get_bolt_app_logger(self.app_name, self.func, base_logger)

async def async_matches(self, req: AsyncBoltRequest, resp: BoltResponse) -&gt; bool:
return await self.func(
Expand Down Expand Up @@ -189,7 +201,7 @@ <h2 id="returns">Returns</h2>
</dd>
<dt id="slack_bolt.listener_matcher.async_listener_matcher.AsyncCustomListenerMatcher"><code class="flex name class">
<span>class <span class="ident">cls</span></span>
<span>(</span><span>*, app_name: str, func: Callable[..., Awaitable[bool]])</span>
<span>(</span><span>*, app_name: str, func: Callable[..., Awaitable[bool]], base_logger: Optional[logging.Logger] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -203,11 +215,17 @@ <h2 id="returns">Returns</h2>
arg_names: Sequence[str]
logger: Logger

def __init__(self, *, app_name: str, func: Callable[..., Awaitable[bool]]):
def __init__(
self,
*,
app_name: str,
func: Callable[..., Awaitable[bool]],
base_logger: Optional[Logger] = None
):
self.app_name = app_name
self.func = func
self.arg_names = inspect.getfullargspec(func).args
self.logger = get_bolt_app_logger(self.app_name, self.func)
self.logger = get_bolt_app_logger(self.app_name, self.func, base_logger)

async def async_matches(self, req: AsyncBoltRequest, resp: BoltResponse) -&gt; bool:
return await self.func(
Expand Down
Loading

0 comments on commit 89883bd

Please sign in to comment.