Skip to content

Commit

Permalink
Fix a bug from a renamed variable (bug introduced in cf4a375 which tr…
Browse files Browse the repository at this point in the history
…ied to fix W0622 redefined builtin "input"). Clarify related docstrings.
  • Loading branch information
Poikilos committed Apr 4, 2024
1 parent cff3d9a commit 44250f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions openlcb/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,16 @@ def setContentsFromInt(bitmask):
"""Get a set of contents from a single numeric bitmask
Args:
bitmask (int): A single number that is the sum of 1 or more
bitmask (int): A single number that is the sum of any number of
protocol bits.
Returns:
set (PIP): The set of protocol bits derived from the bitmask.
set (PIP): The set of protocol bits (bitmasks where 1 bit is on in
each) derived from the bitmask.
"""
retVal = []
for val in PIP.list():
if (val.value & input != 0):
if (val.value & bitmask != 0):
retVal.append(val)
return set(retVal)

Expand Down

0 comments on commit 44250f8

Please sign in to comment.