mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Make lifetime optional in the getBackwardsCompatibleMessage
This should fix the failing tests
This commit is contained in:
parent
a40c7e7410
commit
9f31e1421b
3 changed files with 24 additions and 20 deletions
|
@ -1,11 +1,13 @@
|
|||
# Copyright (c) 2021 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from typing import Optional
|
||||
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from UM.Message import Message
|
||||
from UM.Version import Version
|
||||
|
||||
def getBackwardsCompatibleMessage(text: str, title: str, lifetime: int, message_type_str: str) -> Message:
|
||||
|
||||
def getBackwardsCompatibleMessage(text: str, title: str, message_type_str: str, lifetime: Optional[int] = 30) -> Message:
|
||||
if CuraApplication.getInstance().getAPIVersion() < Version("7.7.0"):
|
||||
return Message(text=text, title=title, lifetime=lifetime)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue