mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-18 19:15:53 +08:00
Fix mypy complaint again
Mypy doesn't recognize that the check for `None` has happened before calling the `callbackWrap` (before the get request has been made). CURA-8112
This commit is contained in:
parent
300176cdc6
commit
7027a8f904
@ -92,7 +92,7 @@ class DigitalFactoryApiClient:
|
|||||||
if isinstance(response, DigitalFactoryProjectResponse): # The user has only one private project
|
if isinstance(response, DigitalFactoryProjectResponse): # The user has only one private project
|
||||||
callback(True)
|
callback(True)
|
||||||
elif isinstance(response, list) and all(isinstance(r, DigitalFactoryProjectResponse) for r in response):
|
elif isinstance(response, list) and all(isinstance(r, DigitalFactoryProjectResponse) for r in response):
|
||||||
callback(len(response) < self._library_max_private_projects)
|
callback(len(response) < cast(int, self._library_max_private_projects))
|
||||||
else:
|
else:
|
||||||
Logger.warning(f"Digital Factory: Incorrect response type received when requesting private projects: {str(response)}")
|
Logger.warning(f"Digital Factory: Incorrect response type received when requesting private projects: {str(response)}")
|
||||||
callback(False)
|
callback(False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user