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

Untyped decorator makes function "hello" untyped #3611

Open
patrick91 opened this issue Sep 2, 2024 · 0 comments
Open

Untyped decorator makes function "hello" untyped #3611

patrick91 opened this issue Sep 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@patrick91
Copy link
Member

patrick91 commented Sep 2, 2024

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 patrick91 added the bug Something isn't working label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant