You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/07/13 05:40:28 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #32575: D205 Support - Models
uranusjr commented on code in PR #32575:
URL: https://github.com/apache/airflow/pull/32575#discussion_r1262003109
##########
airflow/models/baseoperator.py:
##########
@@ -354,8 +354,7 @@ class BaseOperatorMeta(abc.ABCMeta):
@classmethod
def _apply_defaults(cls, func: T) -> T:
"""
- Function decorator that Looks for an argument named "default_args", and
- fills the unspecified arguments from it.
+ Look for an argument named "default_args", and fills the unspecified arguments from it.
Review Comment:
```suggestion
Look for an argument named "default_args", and fill the unspecified arguments from it.
```
##########
airflow/models/baseoperator.py:
##########
@@ -1127,19 +1128,17 @@ def has_dag(self):
"""
def prepare_for_execution(self) -> BaseOperator:
- """
- Lock task for execution to disable custom action in __setattr__ and
- returns a copy of the task.
- """
+ """Lock task for execution to disable custom action in __setattr__ and returns a copy of the task."""
Review Comment:
```suggestion
"""Lock task for execution to disable custom action in ``__setattr__`` and returns a copy of the task."""
```
##########
airflow/models/baseoperator.py:
##########
@@ -462,10 +461,12 @@ def __new__(cls, name, bases, namespace, **kwargs):
@functools.total_ordering
class BaseOperator(AbstractOperator, metaclass=BaseOperatorMeta):
"""
- Abstract base class for all operators. Since operators create objects that
- become nodes in the dag, BaseOperator contains many recursive methods for
- dag crawling behavior. To derive this class, you are expected to override
- the constructor as well as the 'execute' method.
+ Abstract base class for all operators.
+
+ Since operators create objects that become nodes in the dag, BaseOperator
+ contains many recursive methods for dag crawling behavior. To derive this
+ class, you are expected to override the constructor as well as the 'execute'
+ method.
Review Comment:
```suggestion
Since operators create objects that become nodes in the DAG, BaseOperator
contains many recursive methods for DAG crawling behavior. To derive from
this class, you are expected to override the constructor and the 'execute'
method.
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org