Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 2 commits into from
Feb 6, 2018
Merged

Clean up units.py #10370

merged 2 commits into from
Feb 6, 2018

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented Feb 2, 2018

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.

If any of the above are None, the axis will simply use the default
Parameters
----------
majloc, minloc :
Copy link
Member

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.

"""
@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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the axis

"""
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``.'
Copy link
Member

@timhoffm timhoffm Feb 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tripple double quotes

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.'
Copy link
Member

@timhoffm timhoffm Feb 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tripple double quotes

"""
@staticmethod
def axisinfo(unit, axis):
'return an units.AxisInfo instance for axis with the specified units'
'''
Copy link
Member

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)

@tacaswell tacaswell added this to the v2.2 milestone Feb 3, 2018
@phobson phobson merged commit a3d1c46 into matplotlib:master Feb 6, 2018
@dstansby dstansby deleted the units-clean branch February 6, 2018 09:40
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants