Cleanup with ruff check (#1182)

* Implement improvements suggested by ruff check.

* Add ruff check to CI.
This commit is contained in:
Felix Fontein
2025-10-28 06:58:15 +01:00
committed by GitHub
parent 3bade286f8
commit dbc7b0ec18
40 changed files with 247 additions and 232 deletions
+2 -2
View File
@@ -64,8 +64,8 @@ def shutdown_writing(
# probably: "TypeError: shutdown() takes 1 positional argument but 2 were given"
log(f"Shutting down for writing not possible; trying shutdown instead: {e}")
sock.shutdown() # type: ignore
elif isinstance(sock, getattr(pysocket, "SocketIO")):
sock._sock.shutdown(pysocket.SHUT_WR)
elif isinstance(sock, pysocket.SocketIO): # type: ignore
sock._sock.shutdown(pysocket.SHUT_WR) # type: ignore[unreachable]
else:
log("No idea how to signal end of writing")