Skip to content

Fix pylint errors #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adafruit_wiznet5k/adafruit_wiznet5k.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions adafruit_wiznet5k/adafruit_wiznet5k_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down