Skip to content

Commit cbb1e26

Browse files
committed
refactor fixed some lint issues
1 parent 69a2cb0 commit cbb1e26

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/discovery/bootstrap/test_utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
Test bootstrap address validation
44
"""
55

6-
import pytest
76
from libp2p.discovery.bootstrap.utils import (
87
parse_bootstrap_peer_info,
98
validate_bootstrap_addresses,
109
)
1110

11+
1212
def test_validate_addresses():
1313
"""Test validation with a mix of valid and invalid addresses in one list."""
1414
addresses = [
@@ -26,10 +26,14 @@ def test_validate_addresses():
2626
"/ip4/104.236.179.241/tcp/4001/p2p/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
2727
]
2828
validated = validate_bootstrap_addresses(addresses)
29-
assert validated == valid_expected, f"Expected only valid addresses, got: {validated}"
29+
assert validated == valid_expected, (
30+
f"Expected only valid addresses, got: {validated}"
31+
)
3032
for addr in addresses:
3133
peer_info = parse_bootstrap_peer_info(addr)
3234
if addr in valid_expected:
33-
assert peer_info is not None and peer_info.peer_id is not None, f"Should parse valid address: {addr}"
35+
assert peer_info is not None and peer_info.peer_id is not None, (
36+
f"Should parse valid address: {addr}"
37+
)
3438
else:
3539
assert peer_info is None, f"Should not parse invalid address: {addr}"

0 commit comments

Comments
 (0)