Improve transformer explain wording

This commit is contained in:
Joscha 2021-05-23 11:45:14 +02:00
parent 803e5628a2
commit 25e2abdb03

View File

@ -328,10 +328,10 @@ class Transformer:
result = rule.transform(path) result = rule.transform(path)
if isinstance(result, PurePath): if isinstance(result, PurePath):
log.explain(f"Match! Transformed to {fmt_path(result)}") log.explain(f"Match found, transformed path to {fmt_path(result)}")
return result return result
elif result: # Exclamation mark elif result: # Exclamation mark
log.explain("Match! Ignored") log.explain("Match found, path ignored")
return None return None
else: else:
continue continue