[Libreoffice-bugs] [Bug 132293] Run pyflakes on python uitest files
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Apr 22 08:47:30 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=132293
--- Comment #4 from Julien Nabet <serval2412 at yahoo.fr> ---
When considering the method:
398 def charactersActionForValues(nsNode, refNode):
399 ret = []
400
401 refName = refNode.getAttribute("name")
402 for defineNode in [i for i in
getChildrenByName(getChildByName(nsNode, "grammar"), "define") if
defineNode.getAttribute("name") == refName]:
403 ret.append(" {")
404 ret.append(" // %s" % defineNode.getAttribute("name"))
405 for dataNode in getChildrenByName(defineNode, "data"):
406 if dataNode.getAttribute("type") == "int":
407 ret.append(" OOXMLValue::Pointer_t pValue(new
OOXMLIntegerValue(sText));")
408 ret.append(" pValueHandler->setValue(pValue);")
409 ret.append(" }")
410
411 return ret
(see
https://opengrok.libreoffice.org/xref/core/writerfilter/source/ooxml/factoryimpl_ns.py?r=c4fa6efa#398)
since line 402 is wrong, it's quite possible we never enter the loop so the
expected code to generate may never be generated.
It might be a source of bugs. I insist to tell "it might" since I must
recognize I don't really know if it's the case or not.
Remark: I'm not sure too that generating C++ code from Python, Perl whatever is
a good thing since it's less easy to debug/maintain. IMHO, this part should be
converted in C++ but that's another story.
I mean I think we shouldn't wait beginners to fix this type of Pyflakes report
since it's not just cleaning a double import or removing an unreferenced
variable (note that this one can also hide a real bug too).
Don't misunderstand me, I understand the goal of Easyhack, to bring newcomers
to gain confidence when hacking LO but I think that we shouldn't wait them for
some situations.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200422/bb20cbed/attachment.htm>
More information about the Libreoffice-bugs
mailing list