airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ash Berlin-Taylor (Jira)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-5487) airflow/utils/strings.py: Fix unused warning variable
Date Wed, 18 Dec 2019 11:46:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-5487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ash Berlin-Taylor updated AIRFLOW-5487:
---------------------------------------
    Fix Version/s:     (was: 1.10.6)
                   1.10.7

> airflow/utils/strings.py: Fix unused warning variable
> -----------------------------------------------------
>
>                 Key: AIRFLOW-5487
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5487
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: utils
>    Affects Versions: 1.10.6
>            Reporter: Jakob Homan
>            Priority: Minor
>              Labels: ccoss2019, newbie
>             Fix For: 1.10.7
>
>
> 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/utils/strings.py:27
> {code:java}
> def get_random_string(length=8, choices=string.ascii_letters + string.digits):
>     '''
>     Generate random string
>     '''
>     return ''.join([choice(choices) for i in range(length)]) {code}
> Here we use an `i` for a placeholder variable, but this gets flagge as an unused variable. 
We can replace the `i` with `_` and avoid this warning.



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

Mime
View raw message