Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruff 0.9.0 fixes #153

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions purrr/slack_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_channel(name: str) -> str:
except SlackApiError as e:
if e.response["error"] != "name_taken":
error = f"Failed to create {visibility} Slack channel `{n}`"
debug.log(f"{error}: `{e.response["error"]}`")
debug.log(f"{error}: `{e.response['error']}`")
return ""


Expand Down Expand Up @@ -109,7 +109,7 @@ def impersonate_in_reply(
except SlackApiError as e:
error = f"Failed to post {'reply' if ts else 'message'} "
error += f"as <@{user['id']}> in <#{channel_id}>"
debug.log(f"{error}: `{e.response["error"]}`")
debug.log(f"{error}: `{e.response['error']}`")
return ""


Expand Down Expand Up @@ -201,7 +201,7 @@ def mention_in_reply(channel_id: str, comment_url: str, github_user, msg: str) -
return resp["ts"]
except SlackApiError as e:
error = f"Failed to post {'reply' if ts else 'message'} in <#{channel_id}>"
debug.log(f"{error}: `{e.response["error"]}`")
debug.log(f"{error}: `{e.response['error']}`")
return ""


Expand Down
2 changes: 1 addition & 1 deletion samples/discord/events/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def on_discord_message_create(event):
print(f'User {event.data["author"]["username"]} sent: {event.data["content"]}')
print(f"User {event.data['author']['username']} sent: {event.data['content']}")


def on_discord_message_update(event):
Expand Down
2 changes: 1 addition & 1 deletion slack_support/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


def extract_topic(text: str, topics: set[str]) -> str:
prompt = f"""Topics: {', '.join(topics)}
prompt = f"""Topics: {", ".join(topics)}
Is the following text a request for help with one of these topics?
Example responses:
If a request for help and a topic from the list: {{"help": true, "topic": "cats" }}
Expand Down
Loading