Magul added a comment. |
I believe there is other issue here. The
WbQuantity now expects a 'site' parameter. This is needed to ensure correct handling of error bounds.
is just a warning. After this warning code goes here:
if error is None: self.upperBound = self.lowerBound = Decimal(0) elif isinstance(error, tuple): upperError = self._todecimal(error[0]) lowerError = self._todecimal(error[1]) else: upperError = lowerError = self._todecimal(error) self.upperBound = self.amount + upperError self.lowerBound = self.amount - lowerErroras You can see at the end we have 2 assigments that use upperError and lowerError, but in 3-way if-stattement above we set these 2 variables only in elif, first if doesn't set any of these variables and else sets only upperError.
I occurs that Your code @Wesalius went through if error is None: path so there is no local upperError defined.
TASK DETAIL
EMAIL PREFERENCES
To: Magul
Cc: Magul, Dalba, Aklapper, Wesalius, pywikibot-bugs-list, MayS, Mdupont, JJMC89, jayvdb, Masti, Alchimista, Rxy
Cc: Magul, Dalba, Aklapper, Wesalius, pywikibot-bugs-list, MayS, Mdupont, JJMC89, jayvdb, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs