Closed teiesti closed 4 months ago
There seems to be no bug.
This document specifies that the type of args
in
def __init__(self, *args: Assertion) -> None:
is tuple[Annotation, ...]
.
Furthermore, the same document specifies that tuple[Annotation, ...]
stands for a tuple with zero or more Annotation
elements. Having zero Annotation
elements is precisely what an empty connective is meant to have. Thus, the current type declaration is correct.
Given this explanation, I'd also argue that
def __init__(self, *args: Optional[Assertion]) -> None:
would allow And(True_, None)
, which is wrong.
Unless further evidence is presented, I'll close this issue.
@mihammer97
Empty connectives, like
assertion.And()
work but they are disallowed by their type declaration. Change their type so that they are allowed.E.g., change
to