From: Juraj Linkeš <juraj.linkes@pantheon.tech> To: lijuan.tu@intel.com, ohilyard@iol.unh.edu Cc: dts@dpdk.org, Juraj Linkeš <juraj.linkes@pantheon.tech> Subject: [PATCH v1] ics/net_device: fix pylama errors Date: Mon, 6 Dec 2021 13:18:34 +0100 Message-ID: <1638793115-2374-1-git-send-email-juraj.linkes@pantheon.tech> (raw) Pylama found the following errors: nics/net_device.py:104: [E] E0213 Method should have "self" as first argument [pylint] nics/net_device.py:114: [E] E1102 func is not callable [pylint] nics/net_device.py:206: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:297: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:309: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:321: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:401: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:441: [E] E0602 Undefined variable 'bus_id' [pylint] nics/net_device.py:461: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:490: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:516: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:519: [E] E0102 method already defined line 510 [pylint] nics/net_device.py:525: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:622: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] nics/net_device.py:696: [E] E1101 Instance of 'NetDevice' has no 'current_driver' member [pylint] Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech> --- Lijuan, please add additional people to review if needed. --- Lijuan, please add additional people to review if needed. --- Lijuan, please add additional people to review if needed. --- nics/net_device.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/nics/net_device.py b/nics/net_device.py index 96f31327..e7c6b770 100644 --- a/nics/net_device.py +++ b/nics/net_device.py @@ -73,6 +73,7 @@ class NetDevice(object): self.driver_version = '' self.firmware = '' self.pkg = None + self.current_driver = None def stop(self): pass @@ -101,6 +102,7 @@ class NetDevice(object): """ return True + @staticmethod def nic_has_driver(func): """ Check if the NIC has a driver. @@ -438,7 +440,7 @@ class NetDevice(object): 'get_ipv4_addr_freebsd_%s' % generic_driver) - return get_ipv4_addr_freebsd(intf, bus_id, devfun_id) + return get_ipv4_addr_freebsd(intf) def get_ipv4_addr_freebsd_generic(self, intf): """ @@ -515,15 +517,6 @@ class NetDevice(object): self, 'get_ipv6_addr_%s' % self.__get_os_type()) return get_ipv6_addr(self.intf_name, self.current_driver) - @nic_has_driver - def get_ipv6_addr(self): - """ - Get ipv6 address of specified pci device. - """ - get_ipv6_addr = getattr( - self, 'get_ipv6_addr_%s' % self.__get_os_type()) - return get_ipv6_addr(self.intf_name, self.current_driver) - def get_ipv6_addr_linux(self, intf, driver): """ Get ipv6 address of specified pci device on linux. -- 2.20.1
next reply other threads:[~2021-12-06 12:18 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-06 12:18 Juraj Linkeš [this message] 2021-12-06 12:18 ` [PATCH v1] nics/net_device: " Juraj Linkeš 2021-12-15 15:28 ` [PATCH v2] " Juraj Linkeš 2022-01-14 8:55 ` Tu, Lijuan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1638793115-2374-1-git-send-email-juraj.linkes@pantheon.tech \ --to=juraj.linkes@pantheon.tech \ --cc=dts@dpdk.org \ --cc=lijuan.tu@intel.com \ --cc=ohilyard@iol.unh.edu \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
test suite reviews and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \ dts@dpdk.org public-inbox-index dts Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dts AGPL code for this site: git clone https://public-inbox.org/public-inbox.git