uranusjr commented on code in PR #27768:
URL: https://github.com/apache/airflow/pull/27768#discussion_r1026124357
##########
airflow/serialization/serialized_objects.py:
##########
@@ -107,6 +107,7 @@ def _get_default_mapped_partial() -> dict[str, Any]:
def encode_relativedelta(var: relativedelta.relativedelta) -> dict[str, Any]:
+ """Encode the relative time between days."""
Review Comment:
```suggestion
"""Encode a relativedelta object."""
```
##########
airflow/serialization/serialized_objects.py:
##########
@@ -117,6 +118,7 @@ def encode_relativedelta(var: relativedelta.relativedelta)
-> dict[str, Any]:
def decode_relativedelta(var: dict[str, Any]) -> relativedelta.relativedelta:
+ """Dencode the relative time between days."""
Review Comment:
```suggestion
"""Dencode a relativedelta object."""
```
##########
airflow/serialization/serialized_objects.py:
##########
@@ -576,7 +578,7 @@ def _deserialize_param(cls, param_dict: dict):
@classmethod
def _serialize_params_dict(cls, params: ParamsDict | dict):
- """Serialize Params dict for a DAG/Task"""
+ """Serialize Params dict for a DAG/Task."""
Review Comment:
```suggestion
"""Serialize Params dict for a DAG or task."""
```
##########
airflow/serialization/serialized_objects.py:
##########
@@ -355,7 +355,7 @@ def _is_excluded(cls, var: Any, attrname: str, instance:
Any) -> bool:
def serialize_to_json(
cls, object_to_serialize: BaseOperator | MappedOperator | DAG,
decorated_fields: set
) -> dict[str, Any]:
- """Serializes an object to json"""
+ """Serializes an object to json."""
Review Comment:
```suggestion
"""Serializes an object to JSON."""
```
##########
airflow/ti_deps/deps/prev_dagrun_dep.py:
##########
@@ -27,8 +27,9 @@
class PrevDagrunDep(BaseTIDep):
"""
- Is the past dagrun in a state that allows this task instance to run, e.g.
did this
- task instance's task in the previous dagrun complete if we are depending
on past.
+ Is the past dagrun in a state that allows this task instance to run.
+
+ For example, did this task instance's task in the previous dagrun complete
if we are depending on past.
Review Comment:
```suggestion
For example, did this task instance's task in the previous dagrun
complete
if we are depending on past?
```
##########
airflow/serialization/serialized_objects.py:
##########
@@ -1079,8 +1081,9 @@ def _deserialize_operator_extra_links(cls,
encoded_op_links: list) -> dict[str,
@classmethod
def _serialize_operator_extra_links(cls, operator_extra_links:
Iterable[BaseOperatorLink]):
"""
- Serialize Operator Links. Store the import path of the OperatorLink
and the arguments
- passed to it. Example
+ Serialize Operator Links.
+
+ Store the import path of the OperatorLink and the arguments passed to
it. Example
Review Comment:
```suggestion
Store the import path of the OperatorLink and the arguments passed
to it.
For example:
```
--
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]