You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/19 16:48:04 UTC

[GitHub] [spark] zero323 commented on pull request #34297: [WIP][SPARK-37022][PYTHON] Use black as a formatter for PySpark

zero323 commented on pull request #34297:
URL: https://github.com/apache/spark/pull/34297#issuecomment-946910459


   @srowen 
   
   > It's a good idea, but the amount of code churn is quite large (which causes back-port problems). Is there a subset of rules to enforce for now that requires much less change?
   
   We could skip trailing commas (`--skip-magic-trailing-comma`) and quotes rewriting (`--skip-string-normalization`), but while accounting for majority of diffs, these are mostly cosmetic changes and shouldn't add much overhead to backporting.
   
   In general, I was thinking about applying `black` to all active past branches (or even inactive, if there is use case for that). For branches, that have no inline annotations, this is fully automated process. This way, we'll have consistent formatting and small inter-branch diffs (yay!) to offset cost of the change.
   
   Also, I won't lie ‒ I proposed this now, even though I thought about it for years, because we inlining  annotations will impact backporting for the time being (suffer once) and, again, smaller diffs can make process easier as well (I've introduced `black` to stubs, primarily to address painful diffs).
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org