liteusb: pep8 (E225)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 13 Apr 2015 12:34:36 +0000 (14:34 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 13 Apr 2015 12:34:36 +0000 (14:34 +0200)
misoclib/com/liteusb/core/depacketizer.py
misoclib/com/liteusb/core/packetizer.py
misoclib/com/liteusb/phy/ft2232h.py

index 4d592e1ebc1d5506045d2a0e5809f2475156cb0f..77a8ad9c9e714c043e8c873a9434ad332313d8a4 100644 (file)
@@ -114,7 +114,7 @@ class DepacketizerSourceModel(Module, Source, RandRun):
             self._stb = 1
 
         if selfp.stb and selfp.ack:
-            self._cnt +=1
+            self._cnt += 1
 
         selfp.stb = self._stb
         selfp.d = self.data[self._cnt]
index dc4b9fe13368bb15a5b72f1e535916d3b603d078..ebd5bf1fefb986ddd728cdb6e5c0a42c1baa6959 100644 (file)
@@ -138,7 +138,7 @@ class TB(Module):
         self.submodules.dut = LiteUSBPacketizer()
         self.submodules.sink = PacketizerSinkModel()
 
-        self.comb +=[
+        self.comb += [
             self.source.connect(self.dut.sink),
             self.dut.source.connect(self.sink),
         ]
index e7511b4555ea319420f1f2bd73b09778dab5dd6a..cc5b400501d2c99ac8fa1ac79be4324a6dcda0e5 100644 (file)
@@ -284,7 +284,7 @@ def print_results(s, l1, l2):
         try:
             for i, val in enumerate(l1):
                 if val != l2[i]:
-                    print(s + " : val : %02X, exp : %02X" %(val, l2[i]))
+                    print(s + " : val : {:02X}, exp : {:02X}".format(val, l2[i]))
                     r = False
         except:
             return r