Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove leftover unnecessary R| formatting #3561

Merged
merged 3 commits into from Nov 3, 2021

Conversation

joshuacwnewton
Copy link
Member

@joshuacwnewton joshuacwnewton commented Nov 3, 2021

Checklist

GitHub

PR contents

Description

This is a tiny PR with just cosmetic changes: With #3361, raw-text formatting is now applied by default to all descriptions (without the need for R|), so I removed those bits of text.

Also, while I was here, I cleaned up the docstrings for SmartFormatter in f3da9b9, since one of them referenced R|.

Linked issues

Fixes #3546.

This is no longer needed, now that we apply "RawTextHelpFormatter"
by default. (In other words, we no longer selectively apply this
using 'R|'.)
This will make the docstrings a little easier to maintain,
since it shouldn't fall out of date as easily.
@joshuacwnewton joshuacwnewton added the documentation category: readthedocs, sourceforge, or SCT courses label Nov 3, 2021
@joshuacwnewton joshuacwnewton added this to the 5.5 milestone Nov 3, 2021
@jcohenadad
Copy link
Member

I come late to the party so i'm not sure exactly when (and why) the _textwrap feature from the parser was removed, but is there a plan to make it look the way it was before?

the way it looks now:

Screen Shot 2021-11-02 at 9 15 27 PM

the way it looked on 5.1.0:
Screen Shot 2021-11-02 at 9 15 11 PM

@joshuacwnewton
Copy link
Member Author

joshuacwnewton commented Nov 3, 2021

I come late to the party so i'm not sure exactly when (and why) the _textwrap feature from the parser was removed

_textwrap isn't available in Python 3.7 (context: #2782), so the old snippets of code we copy-pasted from argparse had broken once we upgraded.

I was assuming that argparse had replaced _textwrap internally with a 3.7-compatible code. But I now see that (as you've pointed out), the changes I made were not identical to the previous copy-pasted code.

Thank you for noticing! I'll dig a little deeper to find out what argparse did once _textwrap broke.

@joshuacwnewton
Copy link
Member Author

Merging this now, but I'll follow up on the formatting in #3562.

@joshuacwnewton joshuacwnewton merged commit 8985ba3 into master Nov 3, 2021
@joshuacwnewton joshuacwnewton deleted the jn/3546-remove-leftover-R-formatting branch November 3, 2021 19:10
joshuacwnewton added a commit that referenced this pull request Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation category: readthedocs, sourceforge, or SCT courses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formatting bug ("R|") introduced via recent Python 3.7 PR
2 participants