airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Miller (JIRA)" <>
Subject [jira] [Created] (AIRFLOW-580) Disable Logging String Formatting Style Warning in
Date Tue, 18 Oct 2016 08:33:58 GMT
Robin Miller created AIRFLOW-580:

             Summary: Disable Logging String Formatting Style Warning in
                 Key: AIRFLOW-580
             Project: Apache Airflow
          Issue Type: Improvement
          Components: logging
         Environment: CI
            Reporter: Robin Miller
            Assignee: Robin Miller
            Priority: Trivial

After a change relating to logging, the formatting checks produced the warning:
"Use % formatting in logging functions and pass the % parameters as arguments"

This occurred on any lines of the form:"Some string with {} in".format(variable))

After a look around the code to identify the norm, it seems there are a lot of lines like
this. Discussion on the dev email list brought up the following points:

- New style formatting is preferred for reading code.
- Old style formatting allows for a slight performance gain in the situation where the log
message is ignored due to the logging level, as it can skip interpolation.
- This performance gain is likely to be very small for our use case.

As such I propose the addition of "logging-format-interpolation" to the pylint disable list
in the .landscape.yml file.

This message was sent by Atlassian JIRA

View raw message