potiuk commented on a change in pull request #5413: [AIRFLOW-4690] Make
tests/api Pylint compatible
URL: https://github.com/apache/airflow/pull/5413#discussion_r294314289
##########
File path: airflow/models/dagrun.py
##########
@@ -65,6 +65,17 @@ class DagRun(Base, LoggingMixin):
UniqueConstraint('dag_id', 'run_id'),
)
+ def __init__(self, dag_id=None, run_id=None, execution_date=None,
start_date=None, external_trigger=None,
+ conf=None, state=None, **kwargs):
+ self.dag_id = dag_id
+ self.run_id = run_id
+ self.execution_date = execution_date
+ self.start_date = start_date
+ self.external_trigger = external_trigger
+ self.conf = conf
+ self.state = state
+ super().__init__(**kwargs)
Review comment:
Hard to say - That's the problem with dynamic constructor params. :).
It looks like we don't need kwargs from the way how DagRun() is executed
(there are just handful of places). But @BasPH - maybe worth checking and
running the tests :).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services