From 0196fd54ea1129f74426c3b4ade726f2e3a56cd1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 22 Nov 2021 16:24:22 +0100 Subject: [PATCH] Add a few missing types The return type missing caused the type checker to think it returned Any, which is clearly not true. And the type missing from _user_profile caused it to think it always had to be None, which is nonsense in any application. Contributes to issue CURA-8539. --- cura/API/Account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/API/Account.py b/cura/API/Account.py index bf8a883c1a..94b28e7b64 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -76,7 +76,7 @@ class Account(QObject): self._error_message = None # type: Optional[Message] self._logged_in = False - self._user_profile = None + self._user_profile = None # type: Optional[UserProfile] self._additional_rights: Dict[str, Any] = {} self._sync_state = SyncState.IDLE self._manual_sync_enabled = False @@ -207,7 +207,7 @@ class Account(QObject): if self._update_timer.isActive(): self._update_timer.stop() - def _onProfileChanged(self, profile: UserProfile): + def _onProfileChanged(self, profile: UserProfile) -> None: self._user_profile = profile self.userProfileChanged.emit()