uranusjr commented on code in PR #62210:
URL: https://github.com/apache/airflow/pull/62210#discussion_r2844761862
##########
task-sdk/src/airflow/sdk/types.py:
##########
@@ -39,6 +40,19 @@
Operator: TypeAlias = BaseOperator | MappedOperator
+class WeightRuleProtocol(Protocol):
+ """
+ Protocol for weight_rule parameter.
+
+ Accepts str (e.g. "downstream"), WeightRule, or custom strategy instances
like PriorityWeightStrategy.
+ """
+
+ pass
Review Comment:
Wouldn’t this simply accept _everything_…? I feel I’m missing something.
Additional declarations should be needed to make this protocol to be effective,
such as a function signature or an attribute on the protocol.
--
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]