From f62a403f28e8c68846fb2d1b76f3d6af26815f68 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 21 Jun 2021 17:20:36 +0200 Subject: [PATCH] Really fix the mypy issue Hopefully CURA-8332 --- cura/OAuth2/KeyringAttribute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 5fc508a4a6..1d6f329ea9 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -1,6 +1,6 @@ # Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import Type, TYPE_CHECKING, Optional, List +from typing import Type, TYPE_CHECKING, Optional, List, Union import keyring from keyring.backend import KeyringBackend @@ -27,7 +27,7 @@ if Platform.isWindows() and hasattr(sys, "frozen"): if Platform.isOSX() and hasattr(sys, "frozen"): from keyring.backends.macOS import Keyring from keyring.backends.macOS.api import KeychainDenied as _KeychainDeniedMacOS - KeychainDenied = _KeychainDeniedMacOS + KeychainDenied: Union[Type[_KeychainDenied], Type[_KeychainDeniedMacOS]] = _KeychainDeniedMacOS keyring.set_keyring(Keyring()) else: KeychainDenied = _KeychainDenied