Skip to content

Commit 03b731d

Browse files
committed
Switch from is to ==
1 parent e6a5cf0 commit 03b731d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

  • betterproto2_compiler/src/betterproto2_compiler

betterproto2_compiler/src/betterproto2_compiler/known_types/any.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def to_dict(self, **kwargs) -> dict[str, typing.Any]:
5151
if value is None:
5252
return output
5353

54-
if type(value).to_dict is betterproto2.Message.to_dict:
54+
if type(value).to_dict == betterproto2.Message.to_dict:
5555
output.update(value.to_dict(**kwargs))
5656
else:
5757
output["value"] = value.to_dict(**kwargs)
@@ -69,7 +69,7 @@ def from_dict(cls, value, *, ignore_unknown_fields: bool = False):
6969
if not msg_cls:
7070
raise TypeError(f"Can't unpack unregistered type: {type_url}")
7171

72-
if msg_cls.to_dict is not betterproto2.Message.to_dict:
72+
if not msg_cls.to_dict == betterproto2.Message.to_dict:
7373
value = value["value"]
7474

7575
return cls(

betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/__init__.py

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)