Skip to content

Commit 1d4ab45

Browse files
committed
Run pyupgrade --py38-plus
1 parent ed6572d commit 1d4ab45

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/pytest_flask/live_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _is_ready(self):
6161
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
6262
try:
6363
sock.connect((self.host, self.port))
64-
except socket.error:
64+
except OSError:
6565
ret = False
6666
else:
6767
ret = True

src/pytest_flask/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def pytest_assertrepr_compare(op, left, right):
3737
left.status_code,
3838
right,
3939
),
40-
"Response status: {}".format(left.status),
40+
f"Response status: {left.status}",
4141
]
4242
return None
4343

tests/test_live_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class TestLiveServer:
1111
def test_init(self, live_server):
1212
assert live_server.port
1313
assert live_server.host == "localhost"
14-
assert live_server.url() == "http://localhost:{0}".format(live_server.port)
14+
assert live_server.url() == f"http://localhost:{live_server.port}"
1515

1616
def test_server_is_alive(self, live_server):
1717
assert live_server._process

0 commit comments

Comments
 (0)