Skip to content

CLN: remove util._doctools._WritableDoc #26164

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
Apr 20, 2019
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
3 changes: 0 additions & 3 deletions pandas/core/arrays/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@

from pandas._libs.interval import (
Interval, IntervalMixin, intervals_to_interval_bounds)
from pandas.compat import add_metaclass
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender
from pandas.util._doctools import _WritableDoc

from pandas.core.dtypes.cast import maybe_convert_platform
from pandas.core.dtypes.common import (
Expand Down Expand Up @@ -127,7 +125,6 @@
:meth:`IntervalArray.from_breaks`, and :meth:`IntervalArray.from_tuples`.
"""),
))
@add_metaclass(_WritableDoc)
class IntervalArray(IntervalMixin, ExtensionArray):
dtype = IntervalDtype()
ndim = 1
Expand Down
3 changes: 0 additions & 3 deletions pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

from pandas._libs import Timedelta, Timestamp
from pandas._libs.interval import Interval, IntervalMixin, IntervalTree
from pandas.compat import add_metaclass
from pandas.util._decorators import Appender, cache_readonly
from pandas.util._doctools import _WritableDoc
from pandas.util._exceptions import rewrite_exception

from pandas.core.dtypes.cast import (
Expand Down Expand Up @@ -126,7 +124,6 @@ def _new_IntervalIndex(cls, d):
"""),

))
@add_metaclass(_WritableDoc)
class IntervalIndex(IntervalMixin, Index):
_typ = 'intervalindex'
_comparables = ['name']
Expand Down
8 changes: 0 additions & 8 deletions pandas/util/_doctools.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,6 @@ def _make_table(self, ax, df, title, height=None):
ax.axis('off')


class _WritableDoc(type):
# Remove this when Python2 support is dropped
# __doc__ is not mutable for new-style classes in Python2, which means
# we can't use @Appender to share class docstrings. This can be used
# with `add_metaclass` to make cls.__doc__ mutable.
pass


if __name__ == "__main__":
import matplotlib.pyplot as plt

Expand Down