mypy: enable warn_redundant_casts, warn_unused_ignores, warn_unreachable
This commit is contained in:
parent
39191514cc
commit
a7dc356dd9
@ -9,11 +9,11 @@ build-backend = "setuptools.build_meta"
|
|||||||
python_version = "3.11"
|
python_version = "3.11"
|
||||||
# disallow_any_generics = true
|
# disallow_any_generics = true
|
||||||
# disallow_untyped_defs = true
|
# disallow_untyped_defs = true
|
||||||
# warn_redundant_casts = true
|
warn_redundant_casts = true
|
||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unused_configs = true
|
warn_unused_configs = true
|
||||||
# warn_unused_ignores = true
|
warn_unused_ignores = true
|
||||||
# warn_unreachable = true
|
warn_unreachable = true
|
||||||
exclude = [
|
exclude = [
|
||||||
'_pb2\.py$', # TOML literal string (single-quotes, no escaping necessary)
|
'_pb2\.py$', # TOML literal string (single-quotes, no escaping necessary)
|
||||||
]
|
]
|
||||||
|
@ -18,7 +18,7 @@ class Message(google.protobuf.message.Message):
|
|||||||
ping: Ping | None = None,
|
ping: Ping | None = None,
|
||||||
mac_states: MacStates | None = None,
|
mac_states: MacStates | None = 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):
|
class Hello(google.protobuf.message.Message):
|
||||||
instance_id: bytes
|
instance_id: bytes
|
||||||
|
@ -6,8 +6,8 @@ import typing
|
|||||||
import pyroute2.netlink # type: ignore
|
import pyroute2.netlink # type: ignore
|
||||||
import pyroute2.netlink.nlsocket # type: ignore
|
import pyroute2.netlink.nlsocket # type: ignore
|
||||||
from pyroute2.netlink.nfnetlink import NFNL_SUBSYS_NFTABLES # 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 nfgen_msg
|
||||||
from pyroute2.netlink.nfnetlink import nftsocket as _nftsocket # type: ignore
|
from pyroute2.netlink.nfnetlink import nftsocket as _nftsocket
|
||||||
|
|
||||||
NFPROTO_INET: int = 1 # nfgen_family "ipv4+ipv6"; strace decodes this as "AF_UNSPEC"
|
NFPROTO_INET: int = 1 # nfgen_family "ipv4+ipv6"; strace decodes this as "AF_UNSPEC"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user