Skip to content

Commit 705f771

Browse files
committed
Fix lint errors
1 parent 4507543 commit 705f771

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

multiaddr/protocols.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@
8080
P_NOISE = 0x01C6
8181
P_WEBTRANSPORT = 0x01D1
8282
P_WEBRTC_DIRECT = 0x118
83-
P_WEBRTC = 0X119
83+
P_WEBRTC = 0x119
8484
P_MEMORY = 0x309
85+
P_CERTHASH = 0x1D2
8586

8687

8788
class Protocol:
@@ -177,6 +178,7 @@ def __repr__(self) -> str:
177178
Protocol(P_WEBRTC_DIRECT, "webrtc-direct", None),
178179
Protocol(P_WEBRTC, "webrtc", None),
179180
Protocol(P_MEMORY, "memory", "memory"),
181+
Protocol(P_CERTHASH, "certhash", "certhash"),
180182
]
181183

182184

newsfragments/97.feature.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
Add the sni protocol support in py-multiaddr in reference with go-multiaddr
1+
Added the following protocols in reference with go-multiaddr
2+
3+
- SNI: 0x01C1
4+
- NOISE: 0x01C6
5+
- CERTHASH:
6+
- WEBRTC:
7+
- WEBRTC-DIRECT:

tests/test_multiaddr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def test_invalid(addr_str):
109109
"/dns/example.com",
110110
"/dns4/موقع.وزارة-الاتصالات.مصر",
111111
"/ip4/127.0.0.1/tcp/443/tls/sni/example.com/http/http-path/foo",
112-
"/memory/4",
112+
"/memory/4",
113113
"/http-path/tmp%2Fbar",
114114
"/http-path/tmp%2Fbar%2Fbaz",
115115
"/http-path/foo",

tests/test_thin_waist_addresses.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import pytest
2-
31
from multiaddr import Multiaddr
4-
from multiaddr.exceptions import StringParseError
52
from multiaddr.utils import get_thin_waist_addresses
63

74

@@ -21,6 +18,7 @@ def test_specific_address_override_port():
2118
addrs = get_thin_waist_addresses(input_addr, 100)
2219
assert addrs == [Multiaddr("/ip4/123.123.123.123/tcp/100")]
2320

21+
2422
def test_ipv4_wildcard():
2523
input_addr = Multiaddr("/ip4/0.0.0.0/tcp/1234")
2624
addrs = get_thin_waist_addresses(input_addr)

0 commit comments

Comments
 (0)