tmt
tmt copied to clipboard
Switch metaclass to `__init_subclass__` ?
I am mostly considering the comment
# TODO: repeat type annotation from `Common` - IIUIC, `cls` should be
# the class being created, in our case that would be a subclass of
# `Common`. For some reason, mypy is uncapable of detecting annotation
# of this attribute in `Common`, and infers its type is `None` because
# of the assignment below. That's incomplete, and leads to mypy warning
# about assignments of `CliInvocation` instances to this attribute.
# Repeating the annotation silences mypy, giving it better picture.
But not sure I quite understand what is meant with the comment.