Skip to content

Commit

Permalink
[Sim][#50] Turn __PULL_SIGNS into a local constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Jun 21, 2022
1 parent c1b03d3 commit e890734
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/z80sim/z80sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ def reduced(self):


class Node(object):
__PULL_SIGNS = {None: 'n', False: 'm', True: 'p'}

def __init__(self, index, pull, custom_id=None):
self.custom_id = custom_id
self.index, self.pull = index, pull
Expand Down Expand Up @@ -154,7 +152,8 @@ def id(self):
if isinstance(self.pull, BoolExpr):
pull = 'x'
else:
pull = self.__PULL_SIGNS[self.pull]
PULL_SIGNS = {None: 'n', False: 'm', True: 'p'}
pull = PULL_SIGNS[self.pull]

if self.custom_id is None:
return f'{pull}{self.index}'
Expand Down

0 comments on commit e890734

Please sign in to comment.