You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.info(f"Look for transformers in `{mpath}`")
@@ -303,7 +305,7 @@ def __call__(self, row, i):
303
305
str: The concatenated string from the cell values.
304
306
"""
305
307
ifnotself.columns:
306
-
self.error(f"No column declared for the {type(self).__name__} transformer, did you forgot to add a `columns` keyword?", section="cat.call", exception=exceptions.TransformerInputError)
308
+
self.error(f"No column declared for the {type(self).__name__} transformer, did you forgot to add a `columns` keyword?", section=f"{type(self).__name__}.call", exception=exceptions.TransformerInputError)
307
309
308
310
foriteminsuper().__call__(row, i):
309
311
yielditem
@@ -350,11 +352,10 @@ def __init__(self,
350
352
raise_errors: if True, the caller is asking for raising exceptions when an error occurs
351
353
"""
352
354
353
-
format_string=kwargs.get("format_string", None)
354
-
ifnotformat_string: # Neither empty string nor None.
355
-
self.error(f"The `format_string` parameter of the `{self.__name__}` transformer cannot be an empty string.")
self.error(f"Cannot have both `translations` (=`{translations}`) and `translations_file` (=`{translations_file}`) defined in a {type(self).__name__} transformer.", section="translate", exception=exceptions.TransformerInterfaceError)
745
+
ifself.translationsandself.translations_file:
746
+
self.error(f"Cannot have both `translations` (=`{self.translations}`) and `translations_file` (=`{self.translations_file}`) defined in a {type(self).__name__} transformer.", section="translate", exception=exceptions.TransformerInterfaceError)
logger.debug(f"\t\t\tGet translations from file: `{translations_file}`")
748
-
ifnottranslate_from:
749
-
self.error(f"No translation source column declared for the `{type(self).__name__}` transformer using translations_file=`{translations_file}`, did you forget to add a `translate_from` keyword?", section="translate.init", exception=exceptions.TransformerInterfaceError)
750
-
ifnottranslate_to:
751
-
self.error(f"No translation target column declared for the `{type(self).__name__}` transformer using translations_file=`{translations_file}`, did you forget to add a `translate_to` keyword?", section="translate.init", exception=exceptions.TransformerInterfaceError)
751
+
elifself.translations_file:
752
+
logger.debug(f"\t\t\tGet translations from file: `{self.translations_file}`")
753
+
ifnotself.translate_from:
754
+
self.error(f"No translation source column declared for the `{type(self).__name__}` transformer using translations_file=`{self.translations_file}`, did you forget to add a `translate_from` keyword?", section="translate.init", exception=exceptions.TransformerInterfaceError)
755
+
ifnotself.translate_to:
756
+
self.error(f"No translation target column declared for the `{type(self).__name__}` transformer using translations_file=`{self.translations_file}`, did you forget to add a `translate_to` keyword?", section="translate.init", exception=exceptions.TransformerInterfaceError)
752
757
else:
753
-
self.translations_file=translations_file
754
-
self.translate_from=translate_from
755
-
self.translate_to=translate_to
758
+
# self.translations_file = translations_file
759
+
# self.translate_from = translate_from
760
+
# self.translate_to = translate_to
756
761
757
762
# Possible arguments from the `translate` section.
self.error("No translation found, did you forget the `translations` keyword?", section="translate.init", exception=exceptions.TransformerInterfaceError)
0 commit comments