pycodestyle complaints and remove unused import
This commit is contained in:
parent
7fd5b507d5
commit
7920985eb5
1 changed files with 6 additions and 7 deletions
|
@ -28,7 +28,6 @@
|
|||
# are focused around helping to create hand-constructed test code.
|
||||
#
|
||||
|
||||
from contextlib import AbstractContextManager
|
||||
from branches import BRANCH_CODES
|
||||
from collections import defaultdict
|
||||
from functools import partial
|
||||
|
@ -429,7 +428,10 @@ class InstructionBlock(PDP11InstructionAssembler):
|
|||
# IF it starts with '+' it means use PC-relative addr mode
|
||||
# which will require some fussing around...
|
||||
if operand_token[0] == '+':
|
||||
return [0o67, self.getlabel(operand_token[1:], idxrel=True, idxadj=4)]
|
||||
return [0o67,
|
||||
self.getlabel(
|
||||
operand_token[1:], idxrel=True, idxadj=4)
|
||||
]
|
||||
else:
|
||||
return [0o27, self.getlabel(operand_token)]
|
||||
|
||||
|
@ -595,7 +597,8 @@ class InstructionBlock(PDP11InstructionAssembler):
|
|||
|
||||
# labels become operand mode 0o67 ... PC-relative w/offset
|
||||
inst = 0o000167
|
||||
return self._seqwords([inst, self.getlabel(dst, idxrel=True, idxadj=4)])
|
||||
return self._seqwords(
|
||||
[inst, self.getlabel(dst, idxrel=True, idxadj=4)])
|
||||
|
||||
def sob(self, reg, target):
|
||||
# the register can be a naked integer 0 .. 5 or an 'r' string
|
||||
|
@ -643,9 +646,6 @@ class InstructionBlock(PDP11InstructionAssembler):
|
|||
f.write(f"D PC {oct(startaddr)[2:]}\n")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import unittest
|
||||
|
||||
|
@ -681,7 +681,6 @@ if __name__ == "__main__":
|
|||
insts = list(a)
|
||||
self.assertEqual(list(a), [0o012700, 6, 0o005001, 0o012701, 6])
|
||||
|
||||
|
||||
def test_labelmath_dot(self):
|
||||
a = InstructionBlock()
|
||||
a.mov('bozo', 'r0')
|
||||
|
|
Loading…
Add table
Reference in a new issue