Skip to content

Commit 9235540

Browse files
authored
Merge pull request #74 from tekktrik/dev/fix-pylint
Fix pylint errors
2 parents ec21dcd + 3e1f4fb commit 9235540

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

adafruit_wiznet5k/adafruit_wiznet5k.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class WIZNET5K: # pylint: disable=too-many-public-methods, too-many-instance-at
148148
def __init__(
149149
self,
150150
spi_bus,
151-
cs,
151+
cs, # pylint: disable=invalid-name
152152
reset=None,
153153
is_dhcp=True,
154154
mac=DEFAULT_MAC,
@@ -493,8 +493,8 @@ def write(self, addr, callback, data):
493493
if hasattr(data, "from_bytes"):
494494
bus_device.write(bytes([data])) # pylint: disable=no-member
495495
else:
496-
for i, _ in enumerate(data):
497-
bus_device.write(bytes([data[i]])) # pylint: disable=no-member
496+
for data_comp in data:
497+
bus_device.write(bytes([data_comp])) # pylint: disable=no-member
498498

499499
# Socket-Register API
500500

adafruit_wiznet5k/adafruit_wiznet5k_dns.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,11 @@ def _build_dns_question(self):
240240
host = self._host.decode("utf-8")
241241
host = host.split(".")
242242
# write out each section of host
243-
for i, _ in enumerate(host):
243+
for data in host:
244244
# append the sz of the section
245-
self._pkt_buf.append(len(host[i]))
245+
self._pkt_buf.append(len(data))
246246
# append the section data
247-
self._pkt_buf += bytes(host[i], "utf-8")
247+
self._pkt_buf += bytes(data, "utf-8")
248248
# end of the name
249249
self._pkt_buf.append(0x00)
250250
# Type A record

0 commit comments

Comments
 (0)