Conversation
lib/matplotlib/style/core.py
Outdated
| for path, name in iter_style_files(style_dir): | ||
| styles[name] = rc_params_from_file(path, use_default_template=False) | ||
| with warnings.catch_warnings(record=True) as warns: | ||
| styles[name] = rc_params_from_file(path, use_default_template=False) |
There was a problem hiding this comment.
This line is too long, we enforce pep8 via tooling in the tests.
|
Can you interactively rebase this to squash out the first two commits and then force-push the single commit up to your 2.x branch? Ping me if you need help with that. |
|
After doing the interactive rebase; do You don't need to do a full rebase to fix this; just reset back to the correct new commits: $ git branch
# Make sure you are on the 'add-warning-context' branch.
$ git status
# Check you haven't got any leftover changes you want to save with git stash or git commit on another branch.
$ git reset --hard b12ea701712fdb6d2ff9b8943aa6fd9a28b89b38
# This will reset you to the commit you rebased everything into.
$ git push --force origin add-warning-context
# Update the copy on GitHub. |
99d2578 to
b12ea70
Compare
|
👍 Could you add test I suggest using Adding this test means that in the future someone won't accidentally break the improvement you have added. |
|
This patch doesn't work on python3 Else, it looks good. |
Because the test does not work on python3
|
I re-targeted this PR at the master branch and will merge it once it passes will merge it and leave it tagged as 2.0.1. This should be backported after we have 2.0 final out. |
Current coverage is 62.12% (diff: 100%)@@ master #7620 diff @@
==========================================
Files 174 174
Lines 56023 56027 +4
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 34800 34804 +4
Misses 21223 21223
Partials 0 0
|
|
Backported to |
ENH: Add warning context to style files
Thanks for the feedback. Again forgive my ignorance with the workflow here: I reverted the first commit, made a feature branch from that, and created a PR to matplotlib/v2.x.
Your suggestion makes more sense. My first attempt was closer to that, but I was trying to preserve the original warning attributes, and went down the wrong path.
#7601