@@ -70,16 +70,16 @@ def getdefaulttimeout() -> Optional[float]:
70
70
return _default_socket_timeout
71
71
72
72
73
- def setdefaulttimeout (timeout : Optional [float ]) -> None :
73
+ def setdefaulttimeout (_timeout : Optional [float ]) -> None :
74
74
"""
75
75
Set the default timeout in seconds (float) for new socket objects. When the socket
76
76
module is first imported, the default is None. See settimeout() for possible values
77
77
and their respective meanings.
78
78
79
- :param Optional[float] timeout : The default timeout in seconds or None.
79
+ :param Optional[float] _timeout : The default timeout in seconds or None.
80
80
"""
81
81
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 ):
83
83
_default_socket_timeout = timeout
84
84
else :
85
85
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:
450
450
451
451
:return int: Number of bytes sent.
452
452
"""
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 )
455
455
gc .collect ()
456
456
return bytes_sent
457
457
@@ -762,3 +762,6 @@ class timeout(TimeoutError):
762
762
763
763
def __init__ (self , msg ):
764
764
super ().__init__ (msg )
765
+
766
+
767
+ # pylint: enable=unused-argument, redefined-builtin, invalid-name
0 commit comments