Skip to content
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
- id: check-merge-conflict
name: Merge Conflicts
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.261'
rev: 'v0.0.269'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion interactions/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ async def _dispatch_interaction(self, event: RawGatewayEvent) -> None: # noqa:
elif autocomplete := self._global_autocompletes.get(str(auto_opt.name)):
callback = autocomplete
else:
raise ValueError(f"Autocomplete callback for {str(auto_opt.name)} not found")
raise ValueError(f"Autocomplete callback for {auto_opt.name!s} not found")

await self.__dispatch_interaction(
ctx=ctx,
Expand Down
2 changes: 1 addition & 1 deletion interactions/ext/debug_extension/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _make_data_line(
if isinstance(aligns, str):
aligns = [aligns for _ in column_widths]

line = (f"{str(value): {align}{width}}" for width, align, value in zip(column_widths, aligns, line, strict=False))
line = (f"{value!s: {align}{width}}" for width, align, value in zip(column_widths, aligns, line, strict=False))
return f"{left_char}{f'{middle_char}'.join(line)}{right_char}"


Expand Down
4 changes: 2 additions & 2 deletions interactions/ext/prefixed_commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _greedy_parse(greedy: Greedy, param: inspect.Parameter) -> Any:
args = typing.get_args(arg)

if len(args) > 2 or NoneType not in args:
raise ValueError(f"Greedy[{repr(arg)}] is invalid.")
raise ValueError(f"Greedy[{arg!r}] is invalid.")

arg = args[0]
default = None
Expand Down Expand Up @@ -317,7 +317,7 @@ async def _greedy_convert(
if param.default:
greedy_args = param.default # im sorry, typehinters
else:
raise BadArgument(f"Failed to find any arguments for {repr(param.type)}.")
raise BadArgument(f"Failed to find any arguments for {param.type!r}.")

return greedy_args, broke_off

Expand Down
2 changes: 1 addition & 1 deletion interactions/models/internal/application_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ def squash_subcommand(subcommands: List) -> Dict:

if any(str(c.description) not in (str(base_description), "No Description Set") for c in cmd_list):
client.logger.warning(
f"Conflicting descriptions found in `{cmd_list[0].name}` subcommands; `{str(base_description)}` will be used"
f"Conflicting descriptions found in `{cmd_list[0].name}` subcommands; `{base_description!s}` will be used"
)
if any(c.default_member_permissions != cmd_list[0].default_member_permissions for c in cmd_list):
raise ValueError(f"Conflicting `default_member_permissions` values found in `{cmd_list[0].name}`")
Expand Down