Skip to content

Commit ca35dc2

Browse files
malfetpytorchmergebot
authored andcommitted
[EZ] Fix UP041 violations (pytorch#163648)
I.e. use `TimeoutError` instead of `socket.timeout` Pull Request resolved: pytorch#163648 Approved by: https://github.com/cyyever, https://github.com/Skylion007
1 parent 649ceda commit ca35dc2

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.ci/aarch64_linux/build_aarch64_wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def wait_for_connection(addr, port, timeout=15, attempt_cnt=5):
241241
try:
242242
with socket.create_connection((addr, port), timeout=timeout):
243243
return
244-
except (ConnectionRefusedError, socket.timeout): # noqa: PERF203
244+
except (ConnectionRefusedError, TimeoutError): # noqa: PERF203
245245
if i == attempt_cnt - 1:
246246
raise
247247
time.sleep(timeout)

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ ignore = [
189189
"UP035",
190190
"UP036",
191191
"UP038",
192-
"UP041",
193192
"FURB161",
194193
]
195194
select = [

0 commit comments

Comments
 (0)