strawberry icon indicating copy to clipboard operation
strawberry copied to clipboard

Untyped decorator makes function "hello" untyped

Open patrick91 opened this issue 1 year ago • 0 comments

import strawberry

from strawberry.permission import BasePermission, PermissionExtension
from typing import Any


class IsAuthenticated(BasePermission):
    def has_permission(self, *arg: Any, **kwargs: Any) -> bool:
        return True


@strawberry.type
class ABC:
    @strawberry.mutation(name="hello")
    def hello(self) -> str:
        return "world"
➜ uv run mypy --strict app.py
app.py:14: error: Untyped decorator makes function "hello" untyped  [misc]
Found 1 error in 1 file (checked 1 source file)

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

patrick91 avatar Sep 02 '24 17:09 patrick91