nuclearpinguin opened a new 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to