mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-03 14:55:12 +08:00
Fix formula check and correct error message
CURA-10901
This commit is contained in:
parent
9db52e3888
commit
01552556d8
@ -22,7 +22,7 @@ class Formulas(Linter):
|
|||||||
|
|
||||||
def check(self) -> Iterator[Diagnostic]:
|
def check(self) -> Iterator[Diagnostic]:
|
||||||
if self._settings["checks"].get("diagnostic-incorrect-formula", False):
|
if self._settings["checks"].get("diagnostic-incorrect-formula", False):
|
||||||
for check in self.checkFormulas:
|
for check in self.checkFormulas():
|
||||||
yield check
|
yield check
|
||||||
|
|
||||||
yield
|
yield
|
||||||
@ -56,7 +56,7 @@ class Formulas(Linter):
|
|||||||
yield Diagnostic(
|
yield Diagnostic(
|
||||||
file=self._file,
|
file=self._file,
|
||||||
diagnostic_name="diagnostic-incorrect-formula",
|
diagnostic_name="diagnostic-incorrect-formula",
|
||||||
message=f"Given formula {value_dict} to calulate {key} of seems incorrect, Do you mean {self._correct_formula}? please correct the formula and try again.",
|
message=f"Given formula {value_dict} to calulate {key} seems incorrect, Do you mean {self._correct_formula}? please correct the formula and try again.",
|
||||||
level="Error",
|
level="Error",
|
||||||
offset=found.span(0)[0],
|
offset=found.span(0)[0],
|
||||||
replacements=replacements
|
replacements=replacements
|
||||||
|
Loading…
x
Reference in New Issue
Block a user