Made the "Using `{}` for {} instead" message more clear

- When normalize_values is false it adds ", only for sorting purposes"
Related to #108
This commit is contained in:
Salvador E. Tropea 2022-03-15 19:17:25 -03:00
parent fc28b6a257
commit fb7e81fb69
1 changed files with 2 additions and 1 deletions

View File

@ -447,7 +447,8 @@ def group_components(cfg, components):
value_sort = comp_match(value, c.ref_prefix)
if value_sort is not None:
c.value_sort = value_sort
logger.warning(get_last_warning() + "Using `{}` for {} instead".format(value, c.ref))
extra = ', only for sorting purposes' if not cfg.normalize_values else ''
logger.warning(get_last_warning() + "Using `{}` for {} instead{}".format(value, c.ref, extra))
else:
c.value_sort = None
# Try to add the component to an existing group