diff --git a/pyproject.toml b/pyproject.toml index abd45c5..e738dbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,11 +9,11 @@ build-backend = "setuptools.build_meta" python_version = "3.11" # disallow_any_generics = true # disallow_untyped_defs = true -# warn_redundant_casts = true +warn_redundant_casts = true warn_return_any = true warn_unused_configs = true -# warn_unused_ignores = true -# warn_unreachable = true +warn_unused_ignores = true +warn_unreachable = true exclude = [ '_pb2\.py$', # TOML literal string (single-quotes, no escaping necessary) ] diff --git a/src/capport/comm/message.pyi b/src/capport/comm/message.pyi index 5e4ff18..41c6b8c 100644 --- a/src/capport/comm/message.pyi +++ b/src/capport/comm/message.pyi @@ -18,7 +18,7 @@ class Message(google.protobuf.message.Message): ping: Ping | None = None, mac_states: MacStates | None = None, ) -> None: ... - def to_variant(self) -> Hello | AuthenticationResult | Ping | MacStates: ... + def to_variant(self) -> Hello | AuthenticationResult | Ping | MacStates | None: ... class Hello(google.protobuf.message.Message): instance_id: bytes diff --git a/src/capport/utils/nft_socket.py b/src/capport/utils/nft_socket.py index 41e1b66..8dec352 100644 --- a/src/capport/utils/nft_socket.py +++ b/src/capport/utils/nft_socket.py @@ -6,8 +6,8 @@ import typing import pyroute2.netlink # type: ignore import pyroute2.netlink.nlsocket # type: ignore from pyroute2.netlink.nfnetlink import NFNL_SUBSYS_NFTABLES # type: ignore -from pyroute2.netlink.nfnetlink import nfgen_msg # type: ignore -from pyroute2.netlink.nfnetlink import nftsocket as _nftsocket # type: ignore +from pyroute2.netlink.nfnetlink import nfgen_msg +from pyroute2.netlink.nfnetlink import nftsocket as _nftsocket NFPROTO_INET: int = 1 # nfgen_family "ipv4+ipv6"; strace decodes this as "AF_UNSPEC"