From 7920985eb51cc9b195106cd995a3a720109572e0 Mon Sep 17 00:00:00 2001 From: Neil Webber Date: Mon, 1 Apr 2024 08:47:08 -0500 Subject: [PATCH] pycodestyle complaints and remove unused import --- pdpasmhelper.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pdpasmhelper.py b/pdpasmhelper.py index 41f1080..e3ea8e8 100644 --- a/pdpasmhelper.py +++ b/pdpasmhelper.py @@ -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')