From 94529e6a81b6f6804c706f7175edaea2b2006cd7 Mon Sep 17 00:00:00 2001 From: hit9 Date: Wed, 24 May 2023 23:26:42 +0800 Subject: [PATCH] Fix typing hint --- lib/py/bitprotolib/bp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/py/bitprotolib/bp.py b/lib/py/bitprotolib/bp.py index c9daf70..14d7efa 100644 --- a/lib/py/bitprotolib/bp.py +++ b/lib/py/bitprotolib/bp.py @@ -191,7 +191,9 @@ class MessageBase(Accessor): def to_dict(self) -> Dict[str, Any]: """Converts this message to a dict.""" - return asdict(self, dict_factory=getattr(self, "dict_factory", dict)) + return asdict( + self, dict_factory=getattr(self, "dict_factory", dict) # type:ignore + ) def to_json( self, indent: Optional[int] = None, separators: Optional[Tuple[str, str]] = None