dry-python/classes

Check that `@typeclass` functions do not have body

sobolevn opened this issue · 0 comments

When defining a typeclass, it is easy to forget that @typeclass definition must not have a body.

Probably, we can check it with mypy.

So, this must be an error:

@typeclass
def some(instance) -> None:
    x = 1