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

[pre-commit.ci] pre-commit autoupdate #652

Closed
wants to merge 2 commits into from
Closed
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 @@ -18,7 +18,7 @@ repos:
- id: check-xml
- id: check-symlinks
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.7.2
hooks:
- id: ruff-format
- id: ruff
Expand Down
4 changes: 1 addition & 3 deletions strawberry_django/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class MissingFieldArgumentError(StrawberryException):
def __init__(self, field_name: str, resolver: FilterOrderFieldResolver):
self.function = resolver.wrapped_func

self.message = (
f'Missing required argument "{field_name}" ' f'in "{resolver.name}"'
)
self.message = f'Missing required argument "{field_name}" in "{resolver.name}"'
self.rich_message = (
f'[bold red]Missing argument [underline]"{field_name}" for field '
f"`[underline]{resolver.name}[/]`"
Expand Down
16 changes: 8 additions & 8 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ def assert_num_queries(n: int, *, using=DEFAULT_DB_ALIAS):
if _client.get().is_async and executed == 0:
return

assert (
executed == n
), "{} queries executed, {} expected\nCaptured queries were:\n{}".format(
executed,
n,
"\n".join(
f"{i}. {q['sql']}" for i, q in enumerate(ctx.captured_queries, start=1)
),
assert executed == n, (
"{} queries executed, {} expected\nCaptured queries were:\n{}".format(
executed,
n,
"\n".join(
f"{i}. {q['sql']}" for i, q in enumerate(ctx.captured_queries, start=1)
),
)
)


Expand Down
Loading