Skip to content

Commit e200b6c

Browse files
committed
Fix linting
1 parent 22bf906 commit e200b6c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_socket.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ def getdefaulttimeout() -> Optional[float]:
7070
return _default_socket_timeout
7171

7272

73-
def setdefaulttimeout(timeout: Optional[float]) -> None:
73+
def setdefaulttimeout(_timeout: Optional[float]) -> None:
7474
"""
7575
Set the default timeout in seconds (float) for new socket objects. When the socket
7676
module is first imported, the default is None. See settimeout() for possible values
7777
and their respective meanings.
7878
79-
:param Optional[float] timeout: The default timeout in seconds or None.
79+
:param Optional[float] _timeout: The default timeout in seconds or None.
8080
"""
8181
global _default_socket_timeout # pylint: disable=global-statement
82-
if timeout is None or (isinstance(timeout, (int, float)) and timeout >= 0):
82+
if _timeout is None or (isinstance(timeout, (int, float)) and timeout >= 0):
8383
_default_socket_timeout = timeout
8484
else:
8585
raise ValueError("Timeout must be None, 0.0 or a positive numeric value.")
@@ -450,8 +450,8 @@ def send(self, data: Union[bytes, bytearray]) -> int:
450450
451451
:return int: Number of bytes sent.
452452
"""
453-
timeout = 0 if self._timeout is None else self._timeout
454-
bytes_sent = _the_interface.socket_write(self._socknum, data, timeout)
453+
_timeout = 0 if self._timeout is None else self._timeout
454+
bytes_sent = _the_interface.socket_write(self._socknum, data, _timeout)
455455
gc.collect()
456456
return bytes_sent
457457

@@ -762,3 +762,6 @@ class timeout(TimeoutError):
762762

763763
def __init__(self, msg):
764764
super().__init__(msg)
765+
766+
767+
# pylint: enable=unused-argument, redefined-builtin, invalid-name

0 commit comments

Comments
 (0)