Open patrick91 opened 4 years ago
For this you can decorator the function manually:
def something():
class Query:
def search(self, input: str) -> str:
return input
decoratorated_search = mydeco(search)
reveal_type(Query.decoratorated_search)
Sorry for the long title! I found a small issue when using
disallow-untyped-decorators
and while having a decorated function inside another function, here's the reproduction:https://mypy-play.net/?mypy=latest&python=3.9&flags=disallow-untyped-decorators&gist=315f6ee827fbb1373b854cd317ee5882
I guess this is not a big deal since we don't normall define functions inside functions, but I got this issue while writing some tests and it'd be nice to get it fixed 😊