Skip to content

Commit

Permalink
fix(pyright): fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bellini666 committed Sep 4, 2024
1 parent 77fbca8 commit bd1daf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions strawberry_django/relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,9 @@ def resolve_connection_from_cache(
)
for node in result
]
has_previous_page = (
result[0]._strawberry_row_number > 1 # type: ignore
if result
else False
)
has_previous_page = result[0]._strawberry_row_number > 1 if result else False
has_next_page = (
result[-1]._strawberry_row_number < result[-1]._strawberry_total_count # type: ignore
result[-1]._strawberry_row_number < result[-1]._strawberry_total_count
if result
else False
)
Expand Down
2 changes: 1 addition & 1 deletion tests/queries/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def generate_query(user_type):
@strawberry.type
class Query:
users: List[user_type] = strawberry_django.field()
users: List[user_type] = strawberry_django.field() # type: ignore

return utils.generate_query(Query)

Expand Down

0 comments on commit bd1daf7

Please sign in to comment.