Skip to content

Commit b77a43e

Browse files
committed
Remove SocketPoolContants
1 parent 09b83c4 commit b77a43e

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_socketpool.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
_global_socketpool = {}
3838

3939

40-
class SocketPoolContants: # pylint: disable=too-few-public-methods
41-
"""Helper class for the constants that are needed everywhere"""
40+
class SocketPool:
41+
"""WIZNET5K SocketPool library"""
4242

4343
# These must match circuitpython "socketpoool" values. However, we cannot
4444
# depend on socketpool being importable, so hard-code them here.
@@ -50,10 +50,6 @@ class SocketPoolContants: # pylint: disable=too-few-public-methods
5050

5151
AF_INET = const(3)
5252

53-
54-
class SocketPool(SocketPoolContants):
55-
"""WIZNET5K SocketPool library"""
56-
5753
def __new__(cls, iface: WIZNET5K):
5854
# We want to make sure to return the same pool for the same interface
5955
if iface not in _global_socketpool:
@@ -191,7 +187,7 @@ def getaddrinfo( # pylint: disable=redefined-builtin,too-many-arguments,unused-
191187
raise ValueError("Port must be an integer")
192188
if not self._is_ipv4_string(host):
193189
host = self.gethostbyname(host)
194-
return [(SocketPoolContants.AF_INET, type, proto, "", (host, port))]
190+
return [(SocketPool.AF_INET, type, proto, "", (host, port))]
195191

196192
def gethostbyname(self, hostname: str) -> str:
197193
"""
@@ -210,8 +206,8 @@ def gethostbyname(self, hostname: str) -> str:
210206

211207
def socket( # pylint: disable=redefined-builtin
212208
self,
213-
family: int = SocketPoolContants.AF_INET,
214-
type: int = SocketPoolContants.SOCK_STREAM,
209+
family: int = AF_INET,
210+
type: int = SOCK_STREAM,
215211
proto: int = 0,
216212
fileno: Optional[int] = None,
217213
):

0 commit comments

Comments
 (0)