You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Kaxil Naik (JIRA)" <ji...@apache.org> on 2018/08/07 20:15:00 UTC

[jira] [Created] (AIRFLOW-2867) Airflow Python Code not compatible to coding guidelines and standards

Kaxil Naik created AIRFLOW-2867:
-----------------------------------

             Summary: Airflow Python Code not compatible to coding guidelines and standards 
                 Key: AIRFLOW-2867
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2867
             Project: Apache Airflow
          Issue Type: Improvement
            Reporter: Kaxil Naik
            Assignee: Kaxil Naik
             Fix For: 2.0.0


Some of the Airflow code doesn't conform to python coding guidelines and standards.

The improvement I have analyzed are below:
- Dictionary creation should be written by dictionary literal
- Mutable default argument. Python’s default arguments are evaluated once when the function is defined, not each time the function is called (like it is in say, Ruby). This means that if you use a mutable default argument and mutate it, you will and have mutated that object for all future calls to the function as well.
- Functions calling sets can be replaced by set literal 
- Replace list literals
- Some of the static methods haven't been set static
- Redundant parentheses



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)