Conversation
…urn True for either bytestrings or unicode strings. So, in order to allow unicode in the matplotlibrc, we need to use this typechecking rather than the former (which was type(s) is string )
…ts passed along with the file sometime.
…than the = that it currently uses.
…ophes. Removing the apostrophes seemed to work. I'm curious about why this occured for some but not all variables. Anyway, my test complained about these but not the others.
There was a problem hiding this comment.
I'm not a big fan of doing asserts in code. Not only do they raise exception that are hard to understand, but they are also only evaluated when the code is not run as optimized. Maybe we should do a proper verification, and raise a more explicit error message?
|
The assert has been removed and the improper docstring is now proper, as requested by @NelleV . Thanks for the review! As an aside, the rest of the class uses lots of improper docstrings and asserts. An issue should probably be added to clean it up, since I imagine a standard style is better than an inconsistent one. Maybe this fits within MEP8 goals - should we make a new issue? |
|
This reminds me -- and it is probably best as a follow-on to this PR -- the matplotlibrc.template is a real mess formatting-wise, and it would be great to give in a consistent look, possibly with a little more whitespace throughout, to make it easier to use and read. |
|
This is really cool work and fixes a lot of niggly inconsistencies, which I really like. My one worry with this approach is that it might be hard to keep So I wonder if there isn't some way we could automate the conversion of Here, you could only remove the comment character when it's followed by a non-space. Am I making sense? |
This pull request achieves approximately two things.
Changes in rcsetup.py :
type("astring") is strdoesn't work for unicode, butisinstance("astring", basestring)works for both bytestrings and unicode. (http://www.evanjones.ca/python-utf8.html). So, I exchanged instances of the former with the latter.Changes in matplotlibrc.template :
New test files :