[FIX] pylint: using variable before assignment
Since last version (1.7) of pylint, new errors have been detected. Related to rev: https://github.com/odoo/odoo/commit/ecac88dcc074b81ede4925a75080e8d2b4975924
This commit is contained in:
@@ -259,7 +259,7 @@ class Lang(models.Model):
|
||||
|
||||
if percent[-1] in 'eEfFgG':
|
||||
parts = formatted.split('.')
|
||||
parts[0], _ = intersperse(parts[0], eval_lang_grouping, thousands_sep)
|
||||
parts[0] = intersperse(parts[0], eval_lang_grouping, thousands_sep)[0]
|
||||
|
||||
formatted = decimal_point.join(parts)
|
||||
|
||||
|
||||
+4
-4
@@ -118,13 +118,13 @@ def test_modifiers(what, expected):
|
||||
node = etree.fromstring(what)
|
||||
transfer_node_to_modifiers(node, modifiers)
|
||||
simplify_modifiers(modifiers)
|
||||
json = json.dumps(modifiers)
|
||||
assert json == expected, "%s != %s" % (json, expected)
|
||||
dump = json.dumps(modifiers)
|
||||
assert dump == expected, "%s != %s" % (dump, expected)
|
||||
elif isinstance(what, dict):
|
||||
transfer_field_to_modifiers(what, modifiers)
|
||||
simplify_modifiers(modifiers)
|
||||
json = json.dumps(modifiers)
|
||||
assert json == expected, "%s != %s" % (json, expected)
|
||||
dump = json.dumps(modifiers)
|
||||
assert dump == expected, "%s != %s" % (dump, expected)
|
||||
|
||||
|
||||
# To use this test:
|
||||
|
||||
Reference in New Issue
Block a user