Skip to content

Check that @typeclass functions do not have body #241

Closed
@sobolevn

Description

@sobolevn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions