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.
This commit is contained in:
Ghostkeeper 2021-11-22 16:24:22 +01:00
parent 1ee9f73075
commit 0196fd54ea
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

@ -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()