Skip to content

Commit

Permalink
Merge pull request #900 from larrybradley/inherit-docstrings
Browse files Browse the repository at this point in the history
Remove deprecated astropy.utils.misc.InheritDocstrings
  • Loading branch information
larrybradley committed Jul 20, 2019
2 parents 18b52e9 + 33e18ea commit 4577487
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -53,7 +53,7 @@
highlight_language = 'python3'

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.2'
needs_sphinx = '1.7'

# To perform a Sphinx version check that needs to be more specific than
# major.minor, call `check_sphinx_version("x.y.z")` here.
Expand Down
3 changes: 1 addition & 2 deletions photutils/aperture/core.py
Expand Up @@ -19,14 +19,13 @@
from .bounding_box import BoundingBox
from ._photometry_utils import (_handle_units, _prepare_photometry_data,
_validate_inputs)
from ..utils.misc import _ABCMetaAndInheritDocstrings
from ..utils._wcs_helpers import _pixel_scale_angle_at_skycoord


__all__ = ['Aperture', 'SkyAperture', 'PixelAperture']


class Aperture(metaclass=_ABCMetaAndInheritDocstrings):
class Aperture(metaclass=abc.ABCMeta):
"""
Abstract base class for all apertures.
"""
Expand Down
6 changes: 2 additions & 4 deletions photutils/background/core.py
Expand Up @@ -10,8 +10,6 @@
from astropy.version import version as astropy_version
import numpy as np

from ..utils.misc import _ABCMetaAndInheritDocstrings

if astropy_version < '3.1':
from astropy.stats import SigmaClip
SIGMA_CLIP = SigmaClip(sigma=3.0, iters=10)
Expand Down Expand Up @@ -59,7 +57,7 @@ def _masked_median(data, axis=None):
return _median


class BackgroundBase(metaclass=_ABCMetaAndInheritDocstrings):
class BackgroundBase(metaclass=abc.ABCMeta):
"""
Base class for classes that estimate scalar background values.
Expand Down Expand Up @@ -102,7 +100,7 @@ def calc_background(self, data, axis=None):
raise NotImplementedError('Needs to be implemented in a subclass.')


class BackgroundRMSBase(metaclass=_ABCMetaAndInheritDocstrings):
class BackgroundRMSBase(metaclass=abc.ABCMeta):
"""
Base class for classes that estimate scalar background RMS values.
Expand Down
3 changes: 1 addition & 2 deletions photutils/detection/findstars.py
Expand Up @@ -20,7 +20,6 @@ class should define a method called ``find_stars`` that finds stars in
from ..utils._moments import _moments, _moments_central
from ..utils.convolution import filter_data
from ..utils.exceptions import NoDetectionsWarning
from ..utils.misc import _ABCMetaAndInheritDocstrings

__all__ = ['StarFinderBase', 'DAOStarFinder', 'IRAFStarFinder']

Expand Down Expand Up @@ -701,7 +700,7 @@ def _find_stars(data, kernel, threshold_eff, min_separation=None,
return star_cutouts


class StarFinderBase(metaclass=_ABCMetaAndInheritDocstrings):
class StarFinderBase(metaclass=abc.ABCMeta):
"""
Abstract base class for star finders.
"""
Expand Down
4 changes: 1 addition & 3 deletions photutils/psf/groupstars.py
Expand Up @@ -8,12 +8,10 @@
from astropy.table import Column
import numpy as np

from ..utils.misc import _ABCMetaAndInheritDocstrings

__all__ = ['DAOGroup', 'DBSCANGroup', 'GroupStarsBase']


class GroupStarsBase(metaclass=_ABCMetaAndInheritDocstrings):
class GroupStarsBase(metaclass=abc.ABCMeta):
"""
This base class provides the basic interface for subclasses that
are capable of classifying stars in groups.
Expand Down
8 changes: 0 additions & 8 deletions photutils/utils/misc.py
Expand Up @@ -4,17 +4,9 @@
versions.
"""

import abc

from astropy.utils.misc import InheritDocstrings

__all__ = ['get_version_info']


class _ABCMetaAndInheritDocstrings(InheritDocstrings, abc.ABCMeta):
pass


def get_version_info():
"""
Return astropy and photutils versions.
Expand Down

0 comments on commit 4577487

Please sign in to comment.