This isn't what we want when it comes to generator conversion and its usage here becuase what will end up happening is we will create a for loop like this:
for (index, item) in enumerate(language_sensors_iterable_builder(
items = [{ 'name': 'model_A','index': ('a' if 1 else 'b') },{ 'name': 'model_B','index': () }],
)):
What we actually want to represent is this:
for (index, item) in enumerate(language_sensors_iterable_builder(
items = [{ 'name': 'model_A','index': ('a' if 1 else 'b') },{ 'name': 'model_B','index': '' }],
)):
The difference is subtle but it will result in bugs during airflow test dag parsing as a result of a tuple being passed instead of an empty string type:
Previously, this was true:
This isn't what we want when it comes to generator conversion and its usage here becuase what will end up happening is we will create a for loop like this:
What we actually want to represent is this:
The difference is subtle but it will result in bugs during airflow test dag parsing as a result of a tuple being passed instead of an empty string type: