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

Write mypy plugin to type decorators #87

Closed
sobolevn opened this issue Jun 13, 2019 · 1 comment
Closed

Write mypy plugin to type decorators #87

sobolevn opened this issue Jun 13, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@sobolevn
Copy link
Member

sobolevn commented Jun 13, 2019

Problem: https://returns.readthedocs.io/en/latest/pages/result.html#safe

from returns.result import safe

@safe
def function(param: int) -> int:
    return param

reveal_type(function)
# Actual => def (*Any, **Any) -> builtins.int
# Expected => def (int) -> builtins.int

We need to change the return type, while leaving the input types untouched.
Original issue: python/mypy#3157

@sobolevn sobolevn added the enhancement New feature or request label Jun 13, 2019
@sobolevn
Copy link
Member Author

Closed with #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant