add linebreak on long line
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 17:38:21 +0000 (17:38 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 17:38:21 +0000 (17:38 +0000)
src/interface_decl.py

index e34d102290fc32a4fdc58631a08a75c09d026a76..7fab0fb6c8ddb881a15416b12a61de93f5b5407b 100644 (file)
@@ -31,6 +31,8 @@ class Pin(object):
             res += ','.join(status)
             res += '*)'
         res += " method "
+        if self.io:
+            res += "\n                      "
         if self.action:
             res += " Action "
             res += self.name
@@ -62,7 +64,7 @@ class Interface(object):
                 self.pins.append(Pin(**p))
 
     def __str__(self):
-        return '\n'.join(map(str, self.pins))
+        return '\n'+'\n'.join(map(str, self.pins))
 
     def format(self, i):
         return str(self).format(i)