-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Clean up units.py #10370
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
Clean up units.py #10370
Conversation
lib/matplotlib/units.py
Outdated
If any of the above are None, the axis will simply use the default | ||
Parameters | ||
---------- | ||
majloc, minloc : |
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 colon must be omitted if the type is absent.“ https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#sections
Also in the following lines.
lib/matplotlib/units.py
Outdated
""" | ||
@staticmethod | ||
def axisinfo(unit, axis): | ||
'return an units.AxisInfo instance for axis with the specified units' | ||
''' | ||
Return an `~units.AxisInfo` instance for axis with the specified units. |
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.
for the axis
lib/matplotlib/units.py
Outdated
""" | ||
def __init__(self): | ||
dict.__init__(self) | ||
self._cached = {} | ||
|
||
def get_converter(self, x): | ||
'get the converter interface instance for x, or None' | ||
'Get the converter interface instance for *x*, or ``None``.' |
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.
Tripple double quotes
lib/matplotlib/units.py
Outdated
return None | ||
|
||
@staticmethod | ||
def default_units(x, axis): | ||
'return the default unit for x or None for the given axis' | ||
'Return the default unit for *x* or ``None`` for the given axis.' |
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.
Tripple double quotes
lib/matplotlib/units.py
Outdated
""" | ||
@staticmethod | ||
def axisinfo(unit, axis): | ||
'return an units.AxisInfo instance for axis with the specified units' | ||
''' |
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.
Tripple double quotes (PEP 257)
I don't actually know what some of the docstrings mean, but I figure fixing the grammar is probably a good thing to do anyway.