From 87b06af57e9d7543d8865e6bd6a3523ff77f5a74 Mon Sep 17 00:00:00 2001 From: Vasily Zakharov Date: Mon, 11 Sep 2023 01:56:58 +0300 Subject: [PATCH] Typing annotations fixed --- src/packaging/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packaging/version.py b/src/packaging/version.py index 48705389..5faab9bd 100644 --- a/src/packaging/version.py +++ b/src/packaging/version.py @@ -450,7 +450,7 @@ def micro(self) -> int: def _parse_letter_version( - letter: str, number: Union[str, bytes, SupportsInt] + letter: Optional[str], number: Union[str, bytes, SupportsInt, None] ) -> Optional[Tuple[str, int]]: if letter: @@ -488,7 +488,7 @@ def _parse_letter_version( _local_version_separators = re.compile(r"[\._-]") -def _parse_local_version(local: str) -> Optional[LocalType]: +def _parse_local_version(local: Optional[str]) -> Optional[LocalType]: """ Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve"). """