Skip to content
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

Fix SocketPoolConstants typo #161

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 5 additions & 5 deletions adafruit_wiznet5k/adafruit_wiznet5k_socketpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
_global_socketpool = {}


class SocketPoolContants: # pylint: disable=too-few-public-methods
class SocketPoolConstants: # pylint: disable=too-few-public-methods
"""Helper class for the constants that are needed everywhere"""

# These must match circuitpython "socketpoool" values. However, we cannot
Expand All @@ -51,7 +51,7 @@ class SocketPoolContants: # pylint: disable=too-few-public-methods
AF_INET = const(3)


class SocketPool(SocketPoolContants):
class SocketPool(SocketPoolConstants):
"""WIZNET5K SocketPool library"""

def __new__(cls, iface: WIZNET5K):
Expand Down Expand Up @@ -191,7 +191,7 @@ def getaddrinfo( # pylint: disable=redefined-builtin,too-many-arguments,unused-
raise ValueError("Port must be an integer")
if not self._is_ipv4_string(host):
host = self.gethostbyname(host)
return [(SocketPoolContants.AF_INET, type, proto, "", (host, port))]
return [(SocketPoolConstants.AF_INET, type, proto, "", (host, port))]

def gethostbyname(self, hostname: str) -> str:
"""
Expand All @@ -210,8 +210,8 @@ def gethostbyname(self, hostname: str) -> str:

def socket( # pylint: disable=redefined-builtin
self,
family: int = SocketPoolContants.AF_INET,
type: int = SocketPoolContants.SOCK_STREAM,
family: int = SocketPoolConstants.AF_INET,
type: int = SocketPoolConstants.SOCK_STREAM,
proto: int = 0,
fileno: Optional[int] = None,
):
Expand Down
Loading