generated from BrianPugh/python-template
-
-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
Previously, the ability to add counting flags was requested in #249 and implemented in #251. In both the issue and PR, tuple[bool, ...]
is used as the annotation type. However, this does not actually work, giving the following error:
ZeroDivisionError: integer modulo by zero
However, using list[bool]
works (and is in fact what is tested, which is presumably why it wasn't caught).
It looks like this is due to _convert_tuple
deciding that tuple[bool, ...]
both has no inner tokens and also needs to consume all tokens, leading to a zero division error in:
remainder = len(tokens) % inner_token_count
Metadata
Metadata
Assignees
Labels
No labels