Skip to content

Minor formatting update on alias docstrings #11924

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 1 commit into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ def get_valid_values(self, attr):
if docstring is None:
return 'unknown'

if docstring.startswith('alias for '):
if docstring.startswith('Alias for '):
return None

match = self._get_valid_values_regex.search(docstring)
Expand Down Expand Up @@ -1231,7 +1231,7 @@ def is_alias(self, o):
ds = o.__doc__
if ds is None:
return False
return ds.startswith('alias for ')
return ds.startswith('Alias for ')

def aliased_name(self, s):
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/cbook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@ def method(self, *args, **kwargs):
for alias in aliases:
method = make_alias(prefix + prop)
method.__name__ = prefix + alias
method.__doc__ = "alias for `{}`".format(prefix + prop)
method.__doc__ = "Alias for `{}`.".format(prefix + prop)
setattr(cls, prefix + alias, method)
if not exists:
raise ValueError(
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/mlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ def longest_contiguous_ones(x):

@cbook.deprecated('2.2')
def longest_ones(x):
'''alias for longest_contiguous_ones'''
'''Alias for longest_contiguous_ones.'''
return longest_contiguous_ones(x)


Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ def get_usetex(self):

def set_fontname(self, fontname):
"""
alias for `.set_family`
Alias for `.set_family`.

One-way alias only: the getter differs.

Expand Down