From 49afd8564f6032d04dd357c9c9df5afaaac02d6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Aug 2026 17:54:54 +0000 Subject: [PATCH 1/2] build(deps): bump ruff from 0.15.20 to 0.16.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.20 to 0.16.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.20...0.16.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f145361..0f1ff11 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pytest==9.1.1 -ruff==0.15.20 +ruff==0.16.0 slack-bolt==1.30.0 From 0ac8ddbd7532408c0914a88d5b40fed07d070b8b Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Mon, 3 Aug 2026 12:41:09 -0400 Subject: [PATCH 2/2] fix: resolve ruff 0.16.0 default-rule lint errors ruff 0.16.0 expands the default rule set (59 -> 413 rules), which newly enables BLE001 (blind-except) among others. The repo pins no lint selection, so `ruff check .` now fails CI. Replace `except Exception as e: logger.error(e)` with `except Exception: logger.exception(...)` in the sample listeners (satisfies BLE001, avoids F841/TRY401, and now logs tracebacks), and apply the import-sort/format fixes required by the expanded defaults. Co-Authored-By: Claude --- app.py | 2 +- app_oauth.py | 4 ++-- listeners/__init__.py | 7 +------ listeners/actions/__init__.py | 1 + listeners/actions/sample_action.py | 4 ++-- listeners/commands/__init__.py | 1 + listeners/commands/sample_command.py | 7 ++++--- listeners/events/__init__.py | 1 + listeners/events/app_home_opened.py | 4 ++-- listeners/messages/__init__.py | 1 + listeners/messages/sample_message.py | 4 ++-- listeners/shortcuts/__init__.py | 1 + listeners/shortcuts/sample_shortcut.py | 4 ++-- listeners/views/__init__.py | 1 + listeners/views/sample_view.py | 4 ++-- tests/listeners/commands/test_sample_commands.py | 1 - tests/listeners/messages/test_sample_message.py | 1 - tests/listeners/shortcuts/test_sample_shortcut.py | 1 - tests/listeners/views/test_sample_view.py | 1 - 19 files changed, 24 insertions(+), 26 deletions(-) diff --git a/app.py b/app.py index f6c1b29..ed1b002 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,5 @@ -import os import logging +import os from slack_bolt import App from slack_bolt.adapter.socket_mode import SocketModeHandler diff --git a/app_oauth.py b/app_oauth.py index 190e286..c48fab8 100644 --- a/app_oauth.py +++ b/app_oauth.py @@ -1,9 +1,9 @@ import logging import os + from slack_bolt import App, BoltResponse -from slack_bolt.oauth.callback_options import CallbackOptions, SuccessArgs, FailureArgs +from slack_bolt.oauth.callback_options import CallbackOptions, FailureArgs, SuccessArgs from slack_bolt.oauth.oauth_settings import OAuthSettings - from slack_sdk.oauth.installation_store import FileInstallationStore from slack_sdk.oauth.state_store import FileOAuthStateStore diff --git a/listeners/__init__.py b/listeners/__init__.py index f95a68d..465e1f2 100644 --- a/listeners/__init__.py +++ b/listeners/__init__.py @@ -1,9 +1,4 @@ -from listeners import actions -from listeners import commands -from listeners import events -from listeners import messages -from listeners import shortcuts -from listeners import views +from listeners import actions, commands, events, messages, shortcuts, views def register_listeners(app): diff --git a/listeners/actions/__init__.py b/listeners/actions/__init__.py index 75536bf..4a85b1f 100644 --- a/listeners/actions/__init__.py +++ b/listeners/actions/__init__.py @@ -1,4 +1,5 @@ from slack_bolt import App + from .sample_action import sample_action_callback diff --git a/listeners/actions/sample_action.py b/listeners/actions/sample_action.py index 76425b4..57d92f5 100644 --- a/listeners/actions/sample_action.py +++ b/listeners/actions/sample_action.py @@ -60,5 +60,5 @@ def sample_action_callback(ack: Ack, client: WebClient, body: dict, logger: Logg "submit": {"type": "plain_text", "text": "Submit"}, }, ) - except Exception as e: - logger.error(e) + except Exception: + logger.exception("Error opening sample action modal") diff --git a/listeners/commands/__init__.py b/listeners/commands/__init__.py index 8e67e24..e4da248 100644 --- a/listeners/commands/__init__.py +++ b/listeners/commands/__init__.py @@ -1,4 +1,5 @@ from slack_bolt import App + from .sample_command import sample_command_callback diff --git a/listeners/commands/sample_command.py b/listeners/commands/sample_command.py index 7bd4bc7..a3d47b9 100644 --- a/listeners/commands/sample_command.py +++ b/listeners/commands/sample_command.py @@ -1,10 +1,11 @@ -from slack_bolt import Ack, Respond from logging import Logger +from slack_bolt import Ack, Respond + def sample_command_callback(command, ack: Ack, respond: Respond, logger: Logger): try: ack() respond(f"Responding to the sample command! Your command was: {command['text']}") - except Exception as e: - logger.error(e) + except Exception: + logger.exception("Error responding to sample command") diff --git a/listeners/events/__init__.py b/listeners/events/__init__.py index 67a6f69..d638683 100644 --- a/listeners/events/__init__.py +++ b/listeners/events/__init__.py @@ -1,4 +1,5 @@ from slack_bolt import App + from .app_home_opened import app_home_opened_callback diff --git a/listeners/events/app_home_opened.py b/listeners/events/app_home_opened.py index 8520514..9f8bae9 100644 --- a/listeners/events/app_home_opened.py +++ b/listeners/events/app_home_opened.py @@ -31,5 +31,5 @@ def app_home_opened_callback(client: WebClient, event: dict, logger: Logger): ], }, ) - except Exception as e: - logger.error(f"Error publishing home tab: {e}") + except Exception: + logger.exception("Error publishing home tab") diff --git a/listeners/messages/__init__.py b/listeners/messages/__init__.py index 752ed44..734945a 100644 --- a/listeners/messages/__init__.py +++ b/listeners/messages/__init__.py @@ -1,6 +1,7 @@ import re from slack_bolt import App + from .sample_message import sample_message_callback diff --git a/listeners/messages/sample_message.py b/listeners/messages/sample_message.py index 9f280e7..1855d36 100644 --- a/listeners/messages/sample_message.py +++ b/listeners/messages/sample_message.py @@ -7,5 +7,5 @@ def sample_message_callback(context: BoltContext, say: Say, logger: Logger): try: greeting = context["matches"][0] say(f"{greeting}, how are you?") - except Exception as e: - logger.error(e) + except Exception: + logger.exception("Error responding to sample message") diff --git a/listeners/shortcuts/__init__.py b/listeners/shortcuts/__init__.py index f775432..1397414 100644 --- a/listeners/shortcuts/__init__.py +++ b/listeners/shortcuts/__init__.py @@ -1,4 +1,5 @@ from slack_bolt import App + from .sample_shortcut import sample_shortcut_callback diff --git a/listeners/shortcuts/sample_shortcut.py b/listeners/shortcuts/sample_shortcut.py index a92883e..ccb6a49 100644 --- a/listeners/shortcuts/sample_shortcut.py +++ b/listeners/shortcuts/sample_shortcut.py @@ -56,5 +56,5 @@ def sample_shortcut_callback(body: dict, ack: Ack, client: WebClient, logger: Lo "submit": {"type": "plain_text", "text": "Submit"}, }, ) - except Exception as e: - logger.error(e) + except Exception: + logger.exception("Error opening sample shortcut modal") diff --git a/listeners/views/__init__.py b/listeners/views/__init__.py index 2984626..7b2d4b3 100644 --- a/listeners/views/__init__.py +++ b/listeners/views/__init__.py @@ -1,4 +1,5 @@ from slack_bolt import App + from .sample_view import sample_view_callback diff --git a/listeners/views/sample_view.py b/listeners/views/sample_view.py index e85ead6..e2e8c25 100644 --- a/listeners/views/sample_view.py +++ b/listeners/views/sample_view.py @@ -18,5 +18,5 @@ def sample_view_callback(view, ack: Ack, body: dict, client: WebClient, logger: text=f"<@{sample_user_value}> submitted the following :sparkles: " + f"hopes and dreams :sparkles:: \n\n {sample_input_value}", ) - except Exception as e: - logger.error(e) + except Exception: + logger.exception("Error handling sample view submission") diff --git a/tests/listeners/commands/test_sample_commands.py b/tests/listeners/commands/test_sample_commands.py index 886df96..6adfecb 100644 --- a/tests/listeners/commands/test_sample_commands.py +++ b/tests/listeners/commands/test_sample_commands.py @@ -5,7 +5,6 @@ from listeners.commands.sample_command import sample_command_callback - test_logger = logging.getLogger(__name__) diff --git a/tests/listeners/messages/test_sample_message.py b/tests/listeners/messages/test_sample_message.py index 453ba93..72edb6e 100644 --- a/tests/listeners/messages/test_sample_message.py +++ b/tests/listeners/messages/test_sample_message.py @@ -5,7 +5,6 @@ from listeners.messages.sample_message import sample_message_callback - test_logger = logging.getLogger(__name__) diff --git a/tests/listeners/shortcuts/test_sample_shortcut.py b/tests/listeners/shortcuts/test_sample_shortcut.py index b967315..4e27557 100644 --- a/tests/listeners/shortcuts/test_sample_shortcut.py +++ b/tests/listeners/shortcuts/test_sample_shortcut.py @@ -6,7 +6,6 @@ from listeners.shortcuts.sample_shortcut import sample_shortcut_callback - test_logger = logging.getLogger(__name__) diff --git a/tests/listeners/views/test_sample_view.py b/tests/listeners/views/test_sample_view.py index ad2d854..6378c8d 100644 --- a/tests/listeners/views/test_sample_view.py +++ b/tests/listeners/views/test_sample_view.py @@ -6,7 +6,6 @@ from listeners.views.sample_view import sample_view_callback - test_logger = logging.getLogger(__name__)