Skip to content

Commit 42e4e4c

Browse files
authored
DOC: fix PR02 errors in docstrings - pandas.describe_option, pandas.get_option, pandas.reset_option (#57117)
* Copy the signature from the implementation * updated code_checs.sh
1 parent b0b1685 commit 42e4e4c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ci/code_checks.sh

-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
161161
pandas.tseries.offsets.Milli\
162162
pandas.tseries.offsets.Micro\
163163
pandas.tseries.offsets.Nano\
164-
pandas.describe_option\
165-
pandas.reset_option\
166-
pandas.get_option\
167164
pandas.set_option\
168165
pandas.Timestamp.max\
169166
pandas.Timestamp.min\

pandas/_config/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
ContextDecorator,
5555
contextmanager,
5656
)
57+
from inspect import signature
5758
import re
5859
from typing import (
5960
TYPE_CHECKING,
@@ -272,6 +273,7 @@ class CallableDynamicDoc(Generic[T]):
272273
def __init__(self, func: Callable[..., T], doc_tmpl: str) -> None:
273274
self.__doc_tmpl__ = doc_tmpl
274275
self.__func__ = func
276+
self.__signature__ = signature(func)
275277

276278
def __call__(self, *args, **kwds) -> T:
277279
return self.__func__(*args, **kwds)

0 commit comments

Comments
 (0)