Skip to content

Can we remove __str__ methods on enums? #505

@l0b0

Description

@l0b0

A bunch of enums in the code base include this code:

def __str__(self) -> str:
    return str(self.value)

I'm not sure if these are useful, since we can get the same with Foo.BAR.value. A lot of them are not covered by tests either, which probably means they aren't used in production code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions