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 2019/06/27 14:59:00 UTC

[jira] [Commented] (AIRFLOW-4859) Extend list of pylint good-names

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

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

nuclearpinguin commented on pull request #5496: [AIRFLOW-4859] Extend list of pylint good-names
URL: https://github.com/apache/airflow/pull/5496
 
 
   Nearly 10% of pylint errors are related to too short variable name (invalid-name error). So this PR proposes to add `cm, db, f, dr, op` to pylint good-names. Those are shortcuts for:
   - op  = operator
   - dr  = dag run
   - f = file
   - db = database
   - cm = context manager
   
   Stats:
   - all pylint errors ~ 4593
   (`cat _pylint.txt | grep '.py' | cut -d ":" -f 1 | wc -l`)
   - unique files with errors without new good-names: 678 
   (`cat _pylint.txt | grep '.py' | cut -d ":" -f 1 | uniq -c | wc -l `)
   - errors related to `cm, db, f, dr, op` ~ 510
   - unique files with errors without new good-names ~ 660
   
   Pros:
   - 510 less errors to fix
   - 18 less files to refactor
   
   Cons:
   - New variables could be ambiguous if not used in right context
   
   We can also try to allow this change only for tests. This could be done for example by dynamically creating `pylintrc_test` in `ci_pylint.sh`.
   
   ### Jira
   
   - [ ] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title.
     - https://issues.apache.org/jira/browse/AIRFLOW-4859
 
----------------------------------------------------------------
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


> Extend list of pylint good-names
> --------------------------------
>
>                 Key: AIRFLOW-4859
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4859
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: gcp
>    Affects Versions: 2.0.0
>            Reporter: Tomasz Urbaszek
>            Priority: Minor
>




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