From f828ce63e811cb575de2c7d1c401e68b32b91b3b Mon Sep 17 00:00:00 2001 From: spatinom <55927440+spatinom@users.noreply.github.com> Date: Mon, 3 Apr 2023 05:50:34 -0400 Subject: [PATCH] Fix return type of protobuf.ScalarMap.get() (#9996) --- stubs/protobuf/google/protobuf/internal/containers.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/protobuf/google/protobuf/internal/containers.pyi b/stubs/protobuf/google/protobuf/internal/containers.pyi index 80da52a6b..044cd65dc 100644 --- a/stubs/protobuf/google/protobuf/internal/containers.pyi +++ b/stubs/protobuf/google/protobuf/internal/containers.pyi @@ -67,7 +67,7 @@ class ScalarMap(MutableMapping[_K, _ScalarV]): def __iter__(self) -> Iterator[_K]: ... def __eq__(self, other: object) -> bool: ... @overload - def get(self, key: _K, default: None = ...) -> _ScalarV: ... + def get(self, key: _K, default: None = ...) -> _ScalarV | None: ... @overload def get(self, key: _K, default: _ScalarV | _T) -> _ScalarV | _T: ... def MergeFrom(self: _M, other: _M): ... @@ -89,7 +89,7 @@ class MessageMap(MutableMapping[_K, _MessageV]): def __iter__(self) -> Iterator[_K]: ... def __eq__(self, other: object) -> bool: ... @overload - def get(self, key: _K, default: None = ...) -> _MessageV: ... + def get(self, key: _K, default: None = ...) -> _MessageV | None: ... @overload def get(self, key: _K, default: _MessageV | _T) -> _MessageV | _T: ... def get_or_create(self, key: _K) -> _MessageV: ...