Skip to content

Commit

Permalink
chore(pyright): fix pyright issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bellini666 committed Dec 26, 2023
1 parent f4f77a3 commit 6b8664c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion strawberry_django/mutations/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _parse_data(info: Info, model: type[_M], value: Any):

if isinstance(v, ParsedObject):
if v.pk is None:
v = cast(_M, create(info, model(), v.data or {})) # noqa: PLW2901
v = create(info, model, v.data or {}) # noqa: PLW2901
elif isinstance(v.pk, models.Model) and v.data:
v = update(info, v.pk, v.data) # noqa: PLW2901
else:
Expand Down
6 changes: 3 additions & 3 deletions strawberry_django/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def _process_type(
if is_filter:
cls.__annotations__.update(
{
"AND": Optional[Self],
"OR": Optional[Self],
"NOT": Optional[Self],
"AND": Optional[Self], # type: ignore
"OR": Optional[Self], # type: ignore
"NOT": Optional[Self], # type: ignore
},
)

Expand Down

0 comments on commit 6b8664c

Please sign in to comment.