Skip to content

Commit

Permalink
Removes internal coordinate-frame docstring code (#7443)
Browse files Browse the repository at this point in the history
* removed doc-string

* doc-string fix
  • Loading branch information
Deus1704 committed Feb 11, 2024
1 parent 238828f commit 20d23c5
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions sunpy/coordinates/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,30 +178,6 @@ def _is_2d(self):
return (self._data is not None and self._data.norm().unit is u.one
and u.allclose(self._data.norm(), 1*u.one))

def __init_subclass__(cls, **kwargs):
super().__init_subclass__(**kwargs)

# TODO: Remove this after the minimum Astropy dependency includes astropy/astropy#12005
cls._fix_property_docstrings()

@classmethod
def _fix_property_docstrings(cls):
# This class method adds docstrings to properties dynamically created by
# BaseCoordinateFrame.__init_subclass__(). Accordingly, this method needs to itself be
# called from SunPyBaseCoordinateFrame.__init_subclass__() to work for our subclasses.
property_docstrings = {
'default_representation': "Default representation for position data",
'default_differential': "Default representation for differential data",
'frame_specific_representation_info': "Mapping for frame-specific component names",
}
for prop, docstring in property_docstrings.items():
if getattr(cls, prop).__doc__ is None:
setattr(getattr(cls, prop), '__doc__', docstring)


# TODO: Remove this after the minimum Astropy dependency includes astropy/astropy#12005
SunPyBaseCoordinateFrame._fix_property_docstrings()


class BaseHeliographic(SunPyBaseCoordinateFrame):
"""
Expand Down

0 comments on commit 20d23c5

Please sign in to comment.