-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Simplify formatting of matplotlibrc.template. #15023
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
Conversation
3cfb0df
to
c1e4e2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording at the top needs a bit of work, but overall 👍
Checked that this will still parse cleanly:
matplotlib/lib/matplotlib/__init__.py
Lines 893 to 903 in 49cec86
strippedline = line.split('#', 1)[0].strip() | |
if not strippedline: | |
continue | |
tup = strippedline.split(':', 1) | |
if len(tup) != 2: | |
error_details = _error_details_fmt % (line_no, line, fname) | |
_log.warning('Illegal %s', error_details) | |
continue | |
key, val = tup | |
key = key.strip() | |
val = val.strip() |
matplotlibrc.template
Outdated
## which case, four more whitespaces are preferred | ||
## Formatting: Use PEP8-like style (as enforced in the rest of the codebase), | ||
## except that all non-empty lines (whether including an rc entry or just | ||
## comments must start with an additional #. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## comments must start with an additional #. | |
## comments must start with an additional #). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworded, does it sound better?
Having to specify formatting style conventions for matplotlibrc.template is a bit overkill. Just use normal PEP8 style: no spaces before colons, two spaces before inline comments, introduce comments with a single #. Also remove the note re: "editor with python syntax highlighting", given that the whole template appears as a long comment in Python so syntax highlighting buys nothing.
Having to specify formatting style conventions for matplotlibrc.template
is a bit overkill. Just use normal PEP8 style: no spaces before colons,
two spaces before inline comments, introduce comments with a single #.
Also remove the note re: "editor with python syntax highlighting", given
that the whole template appears as a long comment in Python so syntax
highlighting buys nothing.
PR Summary
PR Checklist