Browse Source

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.
Ghostkeeper 3 years ago
parent
commit
0196fd54ea
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cura/API/Account.py

+ 2 - 2
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()