[
https://issues.apache.org/jira/browse/AIRFLOW-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fokko Driesprong resolved AIRFLOW-4034.
---------------------------------------
Resolution: Fixed
Assignee: Bas Harenslak
Fix Version/s: 2.0.0
> Make string formatting explicit by removing locals()
> ----------------------------------------------------
>
> Key: AIRFLOW-4034
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4034
> Project: Apache Airflow
> Issue Type: Improvement
> Reporter: Bas Harenslak
> Assignee: Bas Harenslak
> Priority: Major
> Fix For: 2.0.0
>
>
> Best practice for Python is generally to write explicit and readable code.
> With this mindset, it's preferable to string format like this:
> {code:java}
> mystring = "{var1} {var2}".format(var1=myobject.something,
> var2=somethingelse){code}
> Instead of:
> {code:java}
> mystring = "{var1} {var2}".format(**locals()){code}
> Because it makes string formatting explicit and is readable to the reader of
> the code what variables are used in the string format.
> So, I suggest to remove all **locals() string formatting.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)