jmcarp commented on a change in pull request #4685: [AIRFLOW-3862] Check types
with mypy.
URL: https://github.com/apache/airflow/pull/4685#discussion_r255768340
##########
File path: airflow/www/views.py
##########
@@ -82,7 +83,7 @@
PAGE_SIZE = conf.getint('webserver', 'page_size')
if os.environ.get('SKIP_DAGS_PARSING') != 'True':
- dagbag = models.DagBag(settings.DAGS_FOLDER)
+ dagbag = models.DagBag(settings.DAGS_FOLDER) # type: Any
Review comment:
I agree that this *should* be type `DagBag`, but the `else` block below
defines this variable as the class `DagBag`, not an instance, which `mypy`
reasonably complains about. I'm actually not sure why (or if) this works. Maybe
instead of setting `dagbag` to be a class, we should pass `skip_dag_parsing` to
the `DagBag` constructor so that this variable is always an instance. What do
you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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