Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 19, 2023
1 parent 328a8c4 commit 345b5c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pytest_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ def guarded_connect(inst, *args):
return _true_connect(inst, *args)

allowed = ",".join(allowed_list) if allowed_list else "[]"
message = ("A test tried to use socket.socket.connect() "
f'with host "{host}" (allowed: "{allowed}").')
message = (
"A test tried to use socket.socket.connect() "
f'with host "{host}" (allowed: "{allowed}").'
)
raise SocketConnectBlockedError(message)

socket.socket.connect = guarded_connect
Expand Down

0 comments on commit 345b5c6

Please sign in to comment.