diff --git a/requirements/tools.txt b/requirements/tools.txt index 8378169e4..9432399a7 100644 --- a/requirements/tools.txt +++ b/requirements/tools.txt @@ -1,4 +1,4 @@ -mypy<=1.19.1; +mypy<=2.1.0; # while flake8 5.x have issues with Python 3.12, flake8 6.x requires Python >= 3.8.1, # so 5.x should be kept in order to stay compatible with Python 3.7/3.8 flake8>=7.3.0,<8 diff --git a/slack_sdk/models/blocks/block_elements.py b/slack_sdk/models/blocks/block_elements.py index 813f2ec5e..a238a865a 100644 --- a/slack_sdk/models/blocks/block_elements.py +++ b/slack_sdk/models/blocks/block_elements.py @@ -66,7 +66,7 @@ def parse(cls, block_element: Union[dict, "BlockElement"]) -> Optional[Union["Bl d = copy.copy(block_element) t = d.pop("type") for subclass in cls._get_sub_block_elements(): - if t == subclass.type: + if t == getattr(subclass, "type", None): return subclass(**d) if t == PlainTextObject.type: return PlainTextObject(**d) diff --git a/slack_sdk/socket_mode/aiohttp/__init__.py b/slack_sdk/socket_mode/aiohttp/__init__.py index 936e7c9a5..761683020 100644 --- a/slack_sdk/socket_mode/aiohttp/__init__.py +++ b/slack_sdk/socket_mode/aiohttp/__init__.py @@ -246,7 +246,7 @@ async def receive_messages(self) -> None: self.logger.debug( f"Received message " f"(type: {message_type}, " - f"data: {message_data}, " + f"data: {repr(message_data)}, " f"extra: {message.extra}, " f"session: {session_id})" )