Skip to content

Just for fun, yapf-formatting of PIL/*.py#1167

Closed
aclark4life wants to merge 2 commits intomasterfrom
yapf-formatting
Closed

Just for fun, yapf-formatting of PIL/*.py#1167
aclark4life wants to merge 2 commits intomasterfrom
yapf-formatting

Conversation

@aclark4life
Copy link
Member

And amazingly all tests pass! https://github.com/google/yapf

@aclark4life
Copy link
Member Author

For discussion only right now: some of this a like, some I don't like. In general with a large body of work like PIL, it may be nice to perform a one-time format of all code with yapf to create a "clean slate" effect, then fix annoyances created by the formatted code.

@hugovk
Copy link
Member

hugovk commented Apr 2, 2015

The idea is also similar to the 'gofmt' tool for the Go programming language: end all holy wars about formatting - if the whole code base of a project is simply piped through YAPF whenever modifications are made, the style remains consistent throughout the project and there's no point arguing about style in every code review.

If yapf can be configured to our liking, we can do this.

@wiredfool
Copy link
Member

  • Meh, some of the changes are decent, some are horrible. Oddly enough, some classes of transforms manage to hit both of those in various places in the code. (e.g. deep data structures and exception strings)
  • Don't do anything to OleFileIO, unless it goes upstream first
  • Gofmt is from a different culture and is part of genesis of the language. Python is from a different culture. Guido has said a few times that things like pep8 are more guidelines than rules.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 75.16% when pulling 6d0a4a0 on yapf-formatting into 3f09b8f on master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 75.16% when pulling 6d0a4a0 on yapf-formatting into 3f09b8f on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 75.16% when pulling 6d0a4a0 on yapf-formatting into 3f09b8f on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 75.16% when pulling 6d0a4a0 on yapf-formatting into 3f09b8f on master.

@aclark4life
Copy link
Member Author

@wiredfool I'll configure to taste at some point, using their configuration options. Can we talk you into it if we allow post-formatting fixes to any annoyances that remain?

@radarhere
Copy link
Member

If this was going to be done at any point, I would suggest 3.0 as the time to do it.

@radarhere
Copy link
Member

In light of the discussion in #1770, can this be closed?

@aclark4life
Copy link
Member Author

Sure we can re-open as needed

@aclark4life aclark4life deleted the yapf-formatting branch March 24, 2016 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants