[GitHub] [airflow] uranusjr commented on a change in pull request #19034: Fix ``None`` default Param; refactor Param default handling

2021-10-17 Thread GitBox


uranusjr commented on a change in pull request #19034:
URL: https://github.com/apache/airflow/pull/19034#discussion_r730516842



##
File path: tests/models/test_dag.py
##
@@ -34,6 +34,7 @@
 import jinja2
 import pendulum
 import pytest
+from _pytest.mark import param

Review comment:
   VSCode?  




-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [airflow] uranusjr commented on a change in pull request #19034: Fix ``None`` default Param; refactor Param default handling

2021-10-17 Thread GitBox


uranusjr commented on a change in pull request #19034:
URL: https://github.com/apache/airflow/pull/19034#discussion_r730514702



##
File path: airflow/models/param.py
##
@@ -24,6 +24,16 @@
 from airflow.exceptions import AirflowException
 
 
+class NoValueSentinel:

Review comment:
   I think we now have like five different sentinel class implementations 
in the code base. I have one for `DAG(schedule_interval)`. Probably should 
unify them somewhat into `airflow.utils.types` at some point.
   
   Further reading for those interested: [PEP 661: Sentinel 
Values](https://www.python.org/dev/peps/pep-0661/)




-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [airflow] uranusjr commented on a change in pull request #19034: Fix ``None`` default Param; refactor Param default handling

2021-10-17 Thread GitBox


uranusjr commented on a change in pull request #19034:
URL: https://github.com/apache/airflow/pull/19034#discussion_r730514702



##
File path: airflow/models/param.py
##
@@ -24,6 +24,16 @@
 from airflow.exceptions import AirflowException
 
 
+class NoValueSentinel:

Review comment:
   I think we now have like five different sentinel class implementations 
in the code base. I have one for `DAG(schedule_interval)`. Probably should 
unify them somewhat into `airflow.utils.types` at some point.
   
   Further reading for those interested: 
https://discuss.python.org/t/pep-661-sentinel-values/9126




-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [airflow] uranusjr commented on a change in pull request #19034: Fix ``None`` default Param; refactor Param default handling

2021-10-17 Thread GitBox


uranusjr commented on a change in pull request #19034:
URL: https://github.com/apache/airflow/pull/19034#discussion_r730514702



##
File path: airflow/models/param.py
##
@@ -24,6 +24,16 @@
 from airflow.exceptions import AirflowException
 
 
+class NoValueSentinel:

Review comment:
   I think we now have like five different sentinel class implementations 
in the code base. I have one for `DAG(schedule_interval)`. Probably should 
unify them somewhat into `airflow.utils.types` at some point.




-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org