From: Luke Kenneth Casson Leighton Date: Tue, 20 Mar 2018 21:10:28 +0000 (+0000) Subject: use ifacefmt function name consistently X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b41bae086020d3467d9da16a90cb7d912956a77;p=pinmux.git use ifacefmt function name consistently --- diff --git a/src/interface_decl.py b/src/interface_decl.py index 1ceb841..582d462 100644 --- a/src/interface_decl.py +++ b/src/interface_decl.py @@ -17,7 +17,7 @@ class Pin(object): self.io = io self.action = action - def __str__(self): + def ifacefmt(self): res = ' ' status = [] if self.ready: @@ -63,11 +63,8 @@ class Interface(object): else: self.pins.append(Pin(**p)) - def __str__(self): - return '\n'+'\n'.join(map(str, self.pins)) - def ifacefmt(self, i): - return str(self).format(i) + return '\n'+'\n'.join(map(lambda x:x.ifacefmt(), self.pins)).format(i) # basic test if __name__ == '__main__':