Skip to content

Commit

Permalink
Sync PackageMetadata with email.message.Message
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed Mar 10, 2023
1 parent 8772261 commit 6321180
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions importlib_metadata/_meta.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ._compat import Protocol
from typing import Any, Dict, Iterator, List, TypeVar, Union
from typing import Any, Dict, Iterator, List, TypeVar, Union, overload


_T = TypeVar("_T")
Expand All @@ -18,7 +18,12 @@ def __getitem__(self, key: str) -> str:
def __iter__(self) -> Iterator[str]:
... # pragma: no cover

def get_all(self, name: str, failobj: _T = ...) -> Union[List[Any], _T]:
@overload
def get_all(self, name: str, failobj: None = None) -> Optional[List[Any]]:
...

@overload
def get_all(self, name: str, failobj: _T) -> Union[List[Any], _T]:
"""
Return all values associated with a possibly multi-valued key.
"""
Expand Down

0 comments on commit 6321180

Please sign in to comment.