Lee-W commented on code in PR #69311:
URL: https://github.com/apache/airflow/pull/69311#discussion_r3519377410
##########
airflow-core/src/airflow/partition_mappers/fixed_key.py:
##########
@@ -46,20 +43,26 @@ class FixedKeyMapper(PartitionMapper):
:raises ValueError: if *downstream_key* is not a non-empty ``str``.
"""
- downstream_key: str = attrs.field()
+ downstream_key: str
- @downstream_key.validator
- def _validate_downstream_key(self, attribute: attrs.Attribute, value: str)
-> None:
- if not isinstance(value, str) or value == "":
- raise ValueError(f"FixedKeyMapper downstream_key must be a
non-empty str; got {value!r}.")
+ def __init__(self, downstream_key: str, *, max_downstream_keys: int | None
= None) -> None:
+ if not downstream_key or not isinstance(downstream_key, str):
+ raise ValueError(
+ f"FixedKeyMapper downstream_key must be a non-empty str; got
{downstream_key!r}."
+ )
Review Comment:
Yep, will add it. Would like to get this merge for rc2
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]