You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/02/25 15:02:00 UTC

[jira] [Commented] (AIRFLOW-5485) scheduler_job: replace == None with is_() comparison

    [ https://issues.apache.org/jira/browse/AIRFLOW-5485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17044549#comment-17044549 ] 

ASF GitHub Bot commented on AIRFLOW-5485:
-----------------------------------------

ashb commented on pull request #7533: [AIRFLOW-5485] - scheduler_job: replace == None with is
URL: https://github.com/apache/airflow/pull/7533
 
 
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


> scheduler_job: replace == None with is_() comparison
> ----------------------------------------------------
>
>                 Key: AIRFLOW-5485
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5485
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: hooks
>    Affects Versions: 1.10.6
>            Reporter: Jakob Homan
>            Assignee: Saurabh Dhupar
>            Priority: Minor
>              Labels: ccoss2019, newbie
>
> Note: This ticket's being created to facilitate a new contributor's workshop for Airflow. After the workshop has completed, I'll mark these all available for anyone that might like to take them on.
> airflow/jobs/scheduler_job.py:855
> {code:java}
> .filter(or_(DR.run_id == None,  # noqa: E711 pylint: disable=singleton-comparison
>             not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%'))))
> .outerjoin(DM, DM.dag_id == TI.dag_id)
> .filter(or_(DM.dag_id == None,  # noqa: E711 pylint: disable=singleton-comparison
>         not_(DM.is_paused))) {code}
> We're using {{col == None}} here where we should use {{col.is_(None)}} to avoid confusion as and lint warnings. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)