Skip to content

Add feature to force typings for classes that inherit from Error #6

Description

@chandr-andr

Hello!
I suggest adding a feature that will force users to write typing. It must check in runtime that all class attributes have a specified type and raise a Runtime-like error if they do not.

This feature must NOT be turned on by default.

class Features(enum.Flag):
    ...
    FORCE_ATTRS_TYPING = enum.auto()

    ...

If we have something like this, it should go down with exception:

class MyAwesomeError(Error):
    ...
    some_attr # without type

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions