Skip to content

DM-10448: Rewrap to 79 characters#35

Closed
timj wants to merge 4 commits intomasterfrom
tickets/DM-10448
Closed

DM-10448: Rewrap to 79 characters#35
timj wants to merge 4 commits intomasterfrom
tickets/DM-10448

Conversation

@timj
Copy link
Member

@timj timj commented May 3, 2017

This commit implements RFC-107 for the utils package. The good news is that autopep8 does work. The bad news is that:

  1. it sometimes makes some very bad aesthetic choices. Especially if multiple parentheses are involved in the block.
  2. it doesn't completely fix everything so there will be lines left broken. In particular doc strings (or any quoted strings) will not be fixed up.

Therefore these commits are about 30% automated and the rest manual.

@timj timj requested a review from r-owen May 3, 2017 22:03
@timj timj force-pushed the tickets/DM-10448 branch from f489e52 to ac1a154 Compare May 3, 2017 23:21
@timj timj force-pushed the tickets/DM-10448 branch from ac1a154 to cb157b7 Compare May 5, 2017 15:40
Copy link
Contributor

@r-owen r-owen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look acceptable, though I'll say to @ktlim right now that this reinforces my opinion that 79 characters is a bad idea for our Python code due to decreased readability.

I also agree with @jonathansick that autopep8 is not good enough to use for automatic reformatting of all our code (unlike clang-format, which is basically always good enough). The one small saving grace to autopep8 is that it leaves already compliant lines alone, so at least we can fix the most egregious problems and they will stay fixed (unlike clang-format, which always reformats code). Still, the thought of turning it loose on our entire stack makes me shudder.

@parejkoj
Copy link
Contributor

I think we can probably close this without merging?

@timj
Copy link
Member Author

timj commented Mar 13, 2018

Yes. The docstrings and comments will need to be shortened but we'll have to redo those later. We really want PyCQA/pycodestyle#674 to be merged.

@timj timj closed this May 14, 2018
@timj
Copy link
Member Author

timj commented May 14, 2018

Abandon this. We will stick with 110 for code and 79 for docstrings now that pycodestyle has accepted our patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants