[
https://issues.apache.org/jira/browse/BEAM-9175?focusedWorklogId=377797&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-377797
]
ASF GitHub Bot logged work on BEAM-9175:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Jan/20 18:37
Start Date: 27/Jan/20 18:37
Worklog Time Spent: 10m
Work Description: chadrik commented on issue #10684: [BEAM-9175]
Introduce an autoformatting tool to Python SDK
URL: https://github.com/apache/beam/pull/10684#issuecomment-578890426
We should add a pre-commit lint job to run `yapf`, otherwise the codebase
will drift from the proper yapf formatting over time, and will be rectified all
at once in some unrelated PR when a contributor finally runs it. I think we
can all agree we don't want to be reviewing unrelated style changes in a PR.
From the docs:
> If --diff is supplied, YAPF returns zero when no changes were necessary,
non-zero otherwise (including program error). You can use this in a CI workflow
to test that code has been YAPF-formatted.
Once this is in place we can dismantle the pylint and flake8 checks that
overlap with yapf.
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 377797)
Time Spent: 2h 10m (was: 2h)
> Introduce an autoformatting tool to Python SDK
> ----------------------------------------------
>
> Key: BEAM-9175
> URL: https://issues.apache.org/jira/browse/BEAM-9175
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core, sdk-py-harness
> Reporter: Michał Walenia
> Assignee: Kamil Wasilewski
> Priority: Major
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> It seems there are three main options:
> * black - very simple, but not configurable at all (except for line length),
> would drastically change code style
> * yapf - more options to tweak, can omit parts of code
> * autopep8 - more similar to spotless - only touches code that breaks
> formatting guidelines, can use pycodestyle and flake8 as configuration
> The rigidity of Black makes it unusable for Beam.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)