mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Fix return type of protobuf.ScalarMap.get() (#9996)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user