uranusjr commented on code in PR #67184:
URL: https://github.com/apache/airflow/pull/67184#discussion_r3386519515


##########
task-sdk/src/airflow/sdk/definitions/partition_mappers/base.py:
##########
@@ -18,10 +18,21 @@
 
 from typing import TYPE_CHECKING, ClassVar
 
+import attrs
+
 if TYPE_CHECKING:
     from airflow.sdk.definitions.partition_mappers.window import Window
 
 
+def _validate_max_downstream_keys(instance, attribute, value):
+    if value is not None and (not isinstance(value, int) or value < 1):
+        raise ValueError(f"max_downstream_keys must be a positive integer or 
None, got {value!r}")
+
+
+# slots=False: subclasses (RollupMapper, ChainMapper, etc.) define their own
+# __init__ and set instance attributes not declared on the attrs base; a 
slotted
+# base would raise AttributeError when those subclasses write those attributes.
[email protected](slots=False)

Review Comment:
   This wouldn’t be needed if subclasses also use attrs



-- 
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]

Reply via email to