-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc direasystdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
I saw some nonsense in a comment.
if enum_type == 'flag':
# check for powers of two
for i in range(_high_bit(low)+1, _high_bit(high)):
if 2**i not in values:
missing.append(2**i)
elif enum_type == 'enum':
# check for powers of one
for i in range(low+1, high):
if i not in values:
missing.append(i)
The nonsense in this code, present in the class EnumCheck, is the comment about powers of 1. What is meant is rather "checking the identifiers are contiguous".
I suggest replacing the comment with something more suitable.
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc direasystdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Todo