Skip to content

Commit d5c7d9a

Browse files
committed
mypy now knows about ip_address return types
python/mypy#11905
1 parent 3ea8dae commit d5c7d9a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/someip/sd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
def ip_address(s: str) -> _T_IPADDR:
31-
return typing.cast(_T_IPADDR, ipaddress.ip_address(s.split("%", 1)[0]))
31+
return ipaddress.ip_address(s.split("%", 1)[0])
3232

3333

3434
def pack_addr_v4(a):

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ commands =
3636
basepython = python3.8
3737
skip_install = true
3838
deps =
39-
mypy>=0.780
39+
mypy>=0.940
4040
commands =
4141
mypy --show-error-codes src/ tools/
4242

0 commit comments

Comments
 (0)