Skip to content

Commit f0ee5a1

Browse files
nickovsseratch
authored andcommitted
Fixed return error in name_for_callable and added typing hints.
1 parent 6760174 commit f0ee5a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

slack_bolt/util/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import copy
22
import sys
3-
from typing import Optional, Union, Dict, Any, Sequence
3+
from typing import Optional, Union, Dict, Any, Sequence, Callable
44

55
from slack_sdk import WebClient
66
from slack_sdk.models import JsonObject
@@ -59,8 +59,9 @@ def get_boot_message(development_server: bool = False) -> str:
5959
return "⚡️ Bolt app is running!"
6060

6161

62-
def name_for_callable(func):
62+
def name_for_callable(func: Callable) -> str:
6363
if hasattr(func, "__name__"):
6464
func_name = func.__name__
6565
else:
6666
func_name = f"{func.__class__.__module__}.{func.__class__.__name__}"
67+
return func_name

0 commit comments

Comments
 (0)