mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Cleanup with ruff check (#1182)
* Implement improvements suggested by ruff check. * Add ruff check to CI.
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user