From e890734fd0f97ecade196654271d688858ce8bd7 Mon Sep 17 00:00:00 2001 From: Ivan Kosarev Date: Tue, 21 Jun 2022 16:03:15 +0100 Subject: [PATCH] [Sim][#50] Turn __PULL_SIGNS into a local constant. --- tests/z80sim/z80sim.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/z80sim/z80sim.py b/tests/z80sim/z80sim.py index e025da9..0d53002 100755 --- a/tests/z80sim/z80sim.py +++ b/tests/z80sim/z80sim.py @@ -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 @@ -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}'