diff --git a/twine/auth.py b/twine/auth.py index 83fa6181..7273c554 100644 --- a/twine/auth.py +++ b/twine/auth.py @@ -28,7 +28,7 @@ def __init__(self, config: utils.RepositoryConfig, input: CredentialInput) -> No def choose(cls, interactive: bool) -> Type["Resolver"]: return cls if interactive else Private - @property # type: ignore # https://github.com/python/mypy/issues/1362 + @property @functools.lru_cache() def username(self) -> Optional[str]: return utils.get_userpass_value( @@ -38,7 +38,7 @@ def username(self) -> Optional[str]: prompt_strategy=self.username_from_keyring_or_prompt, ) - @property # type: ignore # https://github.com/python/mypy/issues/1362 + @property @functools.lru_cache() def password(self) -> Optional[str]: return utils.get_userpass_value(