tedmiston commented on pull request #8710:
URL: https://github.com/apache/airflow/pull/8710#issuecomment-623655524


   @mik-laj I agree it's difficult to keep consistent styles longterm without 
automatic checking.
   
   When I'm working on a new PR changing code that doesn't have an automatic 
format check, I look around at the code I'm modifying to ensure the style is 
consistent.  My thought process in this PR is that improving baseline 
consistency is better than not, at least for others who look at nearby style 
when authoring (so that they see one style instead of multiple).
   
   As far as making the process automatic, I have had good results with 
[Black][1] (PSF).  It can also be conveniently added to CI / pre-commit hooks 
(`black --diff ...`).  The [Prefect][3] project along with many others already 
use Black today.
   
   I've also used [YAPF][2] (Google) in the past.  It's more mature and much 
more configurable than Black.  In that sense it is much more like ESLint vs 
Black being more opinionated like gofmt.
   
   I have had good experiences with both, so I don't have a strong preference 
for one over the other necessarily, but I do think adding a code formatter to 
Airflow would benefit everyone today (especially given how much the codebase 
has grown over the past couple years).  What are your thoughts?
   
   [1]: https://github.com/psf/black
   [2]: https://github.com/google/yapf
   [3]: https://github.com/PrefectHQ/prefect
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to