2
2
# SPDX-FileCopyrightText: 2020 Brent Rubell for Adafruit Industries
3
3
#
4
4
# SPDX-License-Identifier: MIT
5
-
5
+ #
6
+ # CPython uses type as an argument in socket.socket, so disable checking in Pylint
7
+ # pylint: disable=redefined-builtin
6
8
"""
7
9
`adafruit_wiznet5k_socket`
8
10
================================================================================
@@ -154,7 +156,7 @@ def getaddrinfo(
154
156
host : str ,
155
157
port : int ,
156
158
family : int = 0 ,
157
- soc_type : int = 0 ,
159
+ type : int = 0 ,
158
160
proto : int = 0 ,
159
161
flags : int = 0 ,
160
162
) -> List [Tuple [int , int , int , str , Tuple [str , int ]]]:
@@ -166,7 +168,7 @@ def getaddrinfo(
166
168
None.
167
169
:param int port: Port number to connect to (0 - 65536).
168
170
:param int family: Ignored and hardcoded as 0x03 (the only family implemented) by the function.
169
- :param int soc_type : The type of socket, either SOCK_STREAM (0x21) for TCP or SOCK_DGRAM (0x02)
171
+ :param int type : The type of socket, either SOCK_STREAM (0x21) for TCP or SOCK_DGRAM (0x02)
170
172
for UDP, defaults to 0.
171
173
:param int proto: Unused in this implementation of socket.
172
174
:param int flags: Unused in this implementation of socket.
@@ -181,7 +183,7 @@ def getaddrinfo(
181
183
raise ValueError ("Port must be an integer" )
182
184
if not _is_ipv4_string (host ):
183
185
host = gethostbyname (host )
184
- return [(AF_INET , soc_type , proto , "" , (host , port ))]
186
+ return [(AF_INET , type , proto , "" , (host , port ))]
185
187
186
188
187
189
def gethostbyname (hostname : str ) -> str :
0 commit comments