From f4f5032a90223837ba671dfabd41e98dc126ceec Mon Sep 17 00:00:00 2001 From: Frederic Meeuwissen <13856291+Frederic98@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:42:07 +0200 Subject: [PATCH 1/3] Only import type hints when type checking --- UM/Settings/SettingFunction.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UM/Settings/SettingFunction.py b/UM/Settings/SettingFunction.py index f2f50a53a..e75a0ad9a 100644 --- a/UM/Settings/SettingFunction.py +++ b/UM/Settings/SettingFunction.py @@ -16,11 +16,11 @@ import math # Imported here so it can be used easily by the setting functions. from UM.Logger import Logger -from UM.Settings.Interfaces import ContainerInterface -from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext if TYPE_CHECKING: from typing import FrozenSet + from UM.Settings.Interfaces import ContainerInterface + from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext @@ -78,7 +78,7 @@ def _safeCompile(self): except Exception as e: Logger.log("e", "Exception in function ({0}) for setting: {1}".format(str(e), self._code)) - def __call__(self, value_provider: ContainerInterface, context: Optional[PropertyEvaluationContext] = None) -> Any: + def __call__(self, value_provider: "ContainerInterface", context: Optional["PropertyEvaluationContext"] = None) -> Any: """Call the actual function to calculate the value. :param value_provider: The container from which to get setting values in the formula. From ee747ce56eecab1a1ab62a605f02fb52014e9a2c Mon Sep 17 00:00:00 2001 From: Frederic Meeuwissen <13856291+Frederic98@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:45:11 +0200 Subject: [PATCH 2/3] Clean up imports --- UM/Settings/SettingFunction.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/UM/Settings/SettingFunction.py b/UM/Settings/SettingFunction.py index e75a0ad9a..695f22614 100644 --- a/UM/Settings/SettingFunction.py +++ b/UM/Settings/SettingFunction.py @@ -2,32 +2,30 @@ # Uranium is released under the terms of the LGPLv3 or higher. import ast -# noinspection PyUnresolvedReferences -import base64 # Imported here so it can be used easily by the setting functions. +import traceback import builtins # To check against functions that are built-in in Python. + +# Imported here, so it can be used easily by the setting functions. # noinspection PyUnresolvedReferences -import hashlib # Imported here so it can be used easily by the setting functions. +import math # noinspection PyUnresolvedReferences -import uuid # Imported here so it can be used easily by the setting functions. +import base64 +# noinspection PyUnresolvedReferences +import hashlib +# noinspection PyUnresolvedReferences +import uuid + from types import CodeType from typing import Any, Callable, Dict, FrozenSet, NamedTuple, Optional, Set, TYPE_CHECKING -# noinspection PyUnresolvedReferences -import math # Imported here so it can be used easily by the setting functions. from UM.Logger import Logger if TYPE_CHECKING: - from typing import FrozenSet from UM.Settings.Interfaces import ContainerInterface from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext - -import traceback - - - class IllegalMethodError(Exception): pass From a62153fd9539320b81c243b7b2544b19fbd2f1ca Mon Sep 17 00:00:00 2001 From: Frederic98 Date: Fri, 7 Jul 2023 09:49:05 +0000 Subject: [PATCH 3/3] update translations --- resources/i18n/cs_CZ/uranium.po | 2 +- resources/i18n/de_DE/uranium.po | 2 +- resources/i18n/es_ES/uranium.po | 2 +- resources/i18n/fi_FI/uranium.po | 2 +- resources/i18n/fr_FR/uranium.po | 2 +- resources/i18n/hu_HU/uranium.po | 2 +- resources/i18n/it_IT/uranium.po | 2 +- resources/i18n/ja_JP/uranium.po | 2 +- resources/i18n/ko_KR/uranium.po | 2 +- resources/i18n/nl_NL/uranium.po | 2 +- resources/i18n/pl_PL/uranium.po | 2 +- resources/i18n/pt_BR/uranium.po | 2 +- resources/i18n/pt_PT/uranium.po | 2 +- resources/i18n/ru_RU/uranium.po | 2 +- resources/i18n/tr_TR/uranium.po | 2 +- resources/i18n/uranium.pot | 62 ++++++++++++++++----------------- resources/i18n/zh_CN/uranium.po | 2 +- resources/i18n/zh_TW/uranium.po | 2 +- 18 files changed, 48 insertions(+), 48 deletions(-) diff --git a/resources/i18n/cs_CZ/uranium.po b/resources/i18n/cs_CZ/uranium.po index c42b1f251..f7e30c616 100644 --- a/resources/i18n/cs_CZ/uranium.po +++ b/resources/i18n/cs_CZ/uranium.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Uranium 5.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: 2022-04-26 00:14+0200\n" "Last-Translator: Miroslav Šustek \n" "Language-Team: DenyCZ \n" diff --git a/resources/i18n/de_DE/uranium.po b/resources/i18n/de_DE/uranium.po index d40e9fda6..a73ebe58d 100644 --- a/resources/i18n/de_DE/uranium.po +++ b/resources/i18n/de_DE/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/es_ES/uranium.po b/resources/i18n/es_ES/uranium.po index ce699b1c1..21a10a0a4 100644 --- a/resources/i18n/es_ES/uranium.po +++ b/resources/i18n/es_ES/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/fi_FI/uranium.po b/resources/i18n/fi_FI/uranium.po index 2536199cb..520dd0fbb 100644 --- a/resources/i18n/fi_FI/uranium.po +++ b/resources/i18n/fi_FI/uranium.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Uranium 5.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: 2017-09-27 12:27+0200\n" "Last-Translator: Bothof \n" "Language-Team: Finnish \n" diff --git a/resources/i18n/fr_FR/uranium.po b/resources/i18n/fr_FR/uranium.po index 862b24f05..6b60371dc 100644 --- a/resources/i18n/fr_FR/uranium.po +++ b/resources/i18n/fr_FR/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/hu_HU/uranium.po b/resources/i18n/hu_HU/uranium.po index 10f6f721e..81103577e 100644 --- a/resources/i18n/hu_HU/uranium.po +++ b/resources/i18n/hu_HU/uranium.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Uranium 5.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: 2019-10-10 22:30+0200\n" "Last-Translator: Nagy Attila\n" "Language-Team: AT-VLOG \n" diff --git a/resources/i18n/it_IT/uranium.po b/resources/i18n/it_IT/uranium.po index 5a2858b9e..3e7e8be47 100644 --- a/resources/i18n/it_IT/uranium.po +++ b/resources/i18n/it_IT/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/ja_JP/uranium.po b/resources/i18n/ja_JP/uranium.po index f627239f3..e8cf449b2 100644 --- a/resources/i18n/ja_JP/uranium.po +++ b/resources/i18n/ja_JP/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/ko_KR/uranium.po b/resources/i18n/ko_KR/uranium.po index f50fe9971..9fc7a2021 100644 --- a/resources/i18n/ko_KR/uranium.po +++ b/resources/i18n/ko_KR/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/nl_NL/uranium.po b/resources/i18n/nl_NL/uranium.po index cb7b8ce87..665502fd1 100644 --- a/resources/i18n/nl_NL/uranium.po +++ b/resources/i18n/nl_NL/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/pl_PL/uranium.po b/resources/i18n/pl_PL/uranium.po index bb88e3ed2..8c1cf05e3 100644 --- a/resources/i18n/pl_PL/uranium.po +++ b/resources/i18n/pl_PL/uranium.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Uranium 5.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: 2019-11-15 15:35+0100\n" "Last-Translator: Mariusz 'Virgin71' Matłosz \n" "Language-Team: reprapy.pl\n" diff --git a/resources/i18n/pt_BR/uranium.po b/resources/i18n/pt_BR/uranium.po index 5c07d56c4..2a3208ef0 100644 --- a/resources/i18n/pt_BR/uranium.po +++ b/resources/i18n/pt_BR/uranium.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Uranium 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: 2022-04-25 07:03+0200\n" "Last-Translator: Cláudio Sampaio \n" "Language-Team: Cláudio Sampaio\n" diff --git a/resources/i18n/pt_PT/uranium.po b/resources/i18n/pt_PT/uranium.po index 57630d431..6273b65d7 100644 --- a/resources/i18n/pt_PT/uranium.po +++ b/resources/i18n/pt_PT/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/ru_RU/uranium.po b/resources/i18n/ru_RU/uranium.po index 1df9c05df..0331c4490 100644 --- a/resources/i18n/ru_RU/uranium.po +++ b/resources/i18n/ru_RU/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/tr_TR/uranium.po b/resources/i18n/tr_TR/uranium.po index 8ecca1176..44b5e101d 100644 --- a/resources/i18n/tr_TR/uranium.po +++ b/resources/i18n/tr_TR/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/uranium.pot b/resources/i18n/uranium.pot index fcee1f415..38298f98a 100644 --- a/resources/i18n/uranium.pot +++ b/resources/i18n/uranium.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -598,122 +598,122 @@ msgid "Local Container Provider" msgstr "" msgctxt "description" -msgid "Provides the Rotate tool." +msgid "Enables saving to local files." msgstr "" msgctxt "name" -msgid "Rotate Tool" +msgid "Local File Output Device" msgstr "" msgctxt "description" -msgid "Provides the Move tool." +msgid "Makes it possible to read Wavefront OBJ files." msgstr "" msgctxt "name" -msgid "Move Tool" +msgid "Wavefront OBJ Reader" msgstr "" msgctxt "description" -msgid "Provides the tool to manipulate the camera." +msgid "Provides support for writing STL files." msgstr "" msgctxt "name" -msgid "Camera Tool" +msgid "STL Writer" msgstr "" msgctxt "description" -msgid "Provides the Mirror tool." +msgid "Provides support for reading STL files." msgstr "" msgctxt "name" -msgid "Mirror Tool" +msgid "STL Reader" msgstr "" msgctxt "description" -msgid "Provides the Scale tool." +msgid "Makes it possible to write Wavefront OBJ files." msgstr "" msgctxt "name" -msgid "Scale Tool" +msgid "Wavefront OBJ Writer" msgstr "" msgctxt "description" -msgid "Provides the Selection tool." +msgid "Outputs log information to the console." msgstr "" msgctxt "name" -msgid "Selection Tool" +msgid "Console Logger" msgstr "" msgctxt "description" -msgid "Enables saving to local files." +msgid "Outputs log information to a file in your settings folder." msgstr "" msgctxt "name" -msgid "Local File Output Device" +msgid "File Logger" msgstr "" msgctxt "description" -msgid "Outputs log information to a file in your settings folder." +msgid "Provides a simple solid mesh view." msgstr "" msgctxt "name" -msgid "File Logger" +msgid "Simple View" msgstr "" msgctxt "description" -msgid "Outputs log information to the console." +msgid "Checks for updates of the software." msgstr "" msgctxt "name" -msgid "Console Logger" +msgid "Update Checker" msgstr "" msgctxt "description" -msgid "Checks for updates of the software." +msgid "Provides the Mirror tool." msgstr "" msgctxt "name" -msgid "Update Checker" +msgid "Mirror Tool" msgstr "" msgctxt "description" -msgid "Makes it possible to read Wavefront OBJ files." +msgid "Provides the Move tool." msgstr "" msgctxt "name" -msgid "Wavefront OBJ Reader" +msgid "Move Tool" msgstr "" msgctxt "description" -msgid "Makes it possible to write Wavefront OBJ files." +msgid "Provides the Rotate tool." msgstr "" msgctxt "name" -msgid "Wavefront OBJ Writer" +msgid "Rotate Tool" msgstr "" msgctxt "description" -msgid "Provides support for reading STL files." +msgid "Provides the tool to manipulate the camera." msgstr "" msgctxt "name" -msgid "STL Reader" +msgid "Camera Tool" msgstr "" msgctxt "description" -msgid "Provides support for writing STL files." +msgid "Provides the Scale tool." msgstr "" msgctxt "name" -msgid "STL Writer" +msgid "Scale Tool" msgstr "" msgctxt "description" -msgid "Provides a simple solid mesh view." +msgid "Provides the Selection tool." msgstr "" msgctxt "name" -msgid "Simple View" +msgid "Selection Tool" msgstr "" diff --git a/resources/i18n/zh_CN/uranium.po b/resources/i18n/zh_CN/uranium.po index 7034120b1..f6f611131 100644 --- a/resources/i18n/zh_CN/uranium.po +++ b/resources/i18n/zh_CN/uranium.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/resources/i18n/zh_TW/uranium.po b/resources/i18n/zh_TW/uranium.po index 54e178129..dc8dd7615 100644 --- a/resources/i18n/zh_TW/uranium.po +++ b/resources/i18n/zh_TW/uranium.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Uranium 5.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:52+0000\n" +"POT-Creation-Date: 2023-07-07 09:49+0000\n" "PO-Revision-Date: 2022-01-02 20:28+0800\n" "Last-Translator: Valen Chang \n" "Language-Team: Valen Chang \n"