Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 25, 2023
1 parent bc766d7 commit 0ac2581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/jupyter_ai/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def initialize_settings(self):
"/help": help_chat_handler,
}

slash_command_pattern = r'^[a-zA-Z0-9_]+$'
slash_command_pattern = r"^[a-zA-Z0-9_]+$"
for chat_handler_ep in chat_handler_eps:
try:
chat_handler = chat_handler_ep.load()
Expand All @@ -158,7 +158,7 @@ def initialize_settings(self):
# Slash IDs may contain only alphanumerics and underscores.
slash_id = chat_handler.slash_id

if chat_handler.routing_method == 'slash_command':
if chat_handler.routing_method == "slash_command":
if chat_handler.slash_id:
# Validate slash ID (/^[A-Za-z0-9_]+$/)
if re.match(slash_command_pattern, chat_handler.slash_id):
Expand Down

0 comments on commit 0ac2581

Please sign in to comment.