Relative Content

Tag Archive for pythonpython-typingmypypython-decorators

Mypy 1.10 reports error when functools.wraps() is used on a generic function

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]

Mypy 1.10 reports error when functools.wraps() is used on a generic function

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]

Mypy 1.10 reports error when functools.wraps() is used on a generic function

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]

Mypy 1.10 reports error when functools.wraps() is used on a generic function

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]

Mypy 1.10 reports error when functools.wraps() is used on a generic function

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]

Mypy 1.10 reports error when functools.wraps() is used on a generic function

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]

Mypy 1.10 reports error when functools.wraps() is used on a generic function

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]

Returning a generic function from a decorator

TLDR; I have a decorator that: changes the function signature the wrapped function uses some generic type arguments Other than the signature I would like to use funtools.wraps to preserve the rest of the information. Is there any way to achieve that without mypy complaining? More context A minimal working example would look like this: […]