MAIF / melusine

📧 Melusine: Use python to automatize your email processing workflow
https://maif.github.io/melusine
Other
352 stars 58 forks source link

Accept transformer methods with no __name__ in Pipelines #177

Open HugoPerrier opened 2 months ago

HugoPerrier commented 2 months ago

Description of Problem:

melusine/base.py:238: in transform
logger.debug(f"Running transform for {type(self).__name__} ({method.__name__})")

If the name attribute is absent, the transform method execution fails. This may happens for mocked methods.

Overview of the Solution: Use a default name if the name attribute is not present

Definition of Done: Transformers with unnamed methods can be run.