From: Luke Kenneth Casson Leighton Date: Thu, 29 Mar 2018 08:33:05 +0000 (+0100) Subject: whoops need __contains__ due to pep8 replacement in for has_key X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be96de66d3b258988aca259b2d17928c1ea96bed;p=pinmux.git whoops need __contains__ due to pep8 replacement in for has_key --- diff --git a/src/spec/interfaces.py b/src/spec/interfaces.py index 17fab16..bc73549 100644 --- a/src/spec/interfaces.py +++ b/src/spec/interfaces.py @@ -8,6 +8,9 @@ class Pinouts(object): self.pins = {} self.fnspec = {} + def __contains__(self, k): + return k in self.pins + def has_key(self, k): return k in self.pins