Xiroo commented on code in PR #35409:
URL: https://github.com/apache/airflow/pull/35409#discussion_r1381723024
##########
airflow/utils/types.py:
##########
@@ -71,3 +71,10 @@ class EdgeInfoType(TypedDict):
"""Extra metadata that the DAG can store about an edge, usually generated
from an EdgeModifier."""
label: str | None
+
+
+@runtime_checkable
+class Stringable(Protocol):
+ def __str__(self) -> str:
+ pass
Review Comment:
I wanted to make it explicit that Stringable must have a __str__.
🤔I know this is not cool but I don't have idea about this.
##########
airflow/utils/types.py:
##########
@@ -71,3 +71,10 @@ class EdgeInfoType(TypedDict):
"""Extra metadata that the DAG can store about an edge, usually generated
from an EdgeModifier."""
label: str | None
+
+
+@runtime_checkable
+class Stringable(Protocol):
+ def __str__(self) -> str:
+ pass
Review Comment:
I wanted to make it explicit that Stringable must have a __str__.
🤔I know this is not cool but I don't have idea about this.
--
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]