From 3e1f4fbebaef1500edb9117a9d9592e9bf68507a Mon Sep 17 00:00:00 2001 From: Alec Delaney <89490472+tekktrik@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:15:28 -0500 Subject: [PATCH] Fix pylint errors --- adafruit_wiznet5k/adafruit_wiznet5k.py | 6 +++--- adafruit_wiznet5k/adafruit_wiznet5k_dns.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/adafruit_wiznet5k/adafruit_wiznet5k.py b/adafruit_wiznet5k/adafruit_wiznet5k.py index da5fd7d..4d380fc 100644 --- a/adafruit_wiznet5k/adafruit_wiznet5k.py +++ b/adafruit_wiznet5k/adafruit_wiznet5k.py @@ -148,7 +148,7 @@ class WIZNET5K: # pylint: disable=too-many-public-methods, too-many-instance-at def __init__( self, spi_bus, - cs, + cs, # pylint: disable=invalid-name reset=None, is_dhcp=True, mac=DEFAULT_MAC, @@ -493,8 +493,8 @@ def write(self, addr, callback, data): if hasattr(data, "from_bytes"): bus_device.write(bytes([data])) # pylint: disable=no-member else: - for i, _ in enumerate(data): - bus_device.write(bytes([data[i]])) # pylint: disable=no-member + for data_comp in data: + bus_device.write(bytes([data_comp])) # pylint: disable=no-member # Socket-Register API diff --git a/adafruit_wiznet5k/adafruit_wiznet5k_dns.py b/adafruit_wiznet5k/adafruit_wiznet5k_dns.py index 5a89afb..c637a5b 100644 --- a/adafruit_wiznet5k/adafruit_wiznet5k_dns.py +++ b/adafruit_wiznet5k/adafruit_wiznet5k_dns.py @@ -240,11 +240,11 @@ def _build_dns_question(self): host = self._host.decode("utf-8") host = host.split(".") # write out each section of host - for i, _ in enumerate(host): + for data in host: # append the sz of the section - self._pkt_buf.append(len(host[i])) + self._pkt_buf.append(len(data)) # append the section data - self._pkt_buf += bytes(host[i], "utf-8") + self._pkt_buf += bytes(data, "utf-8") # end of the name self._pkt_buf.append(0x00) # Type A record