Skip to content

Commit

Permalink
DOC: fix PR02 errors in docstrings - pandas.describe_option, pandas.g…
Browse files Browse the repository at this point in the history
…et_option, pandas.reset_option (#57117)

* Copy the signature from the implementation

* updated code_checs.sh
  • Loading branch information
jrmylow authored Jan 29, 2024
1 parent b0b1685 commit 42e4e4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.tseries.offsets.Milli\
pandas.tseries.offsets.Micro\
pandas.tseries.offsets.Nano\
pandas.describe_option\
pandas.reset_option\
pandas.get_option\
pandas.set_option\
pandas.Timestamp.max\
pandas.Timestamp.min\
Expand Down
2 changes: 2 additions & 0 deletions pandas/_config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
ContextDecorator,
contextmanager,
)
from inspect import signature
import re
from typing import (
TYPE_CHECKING,
Expand Down Expand Up @@ -272,6 +273,7 @@ class CallableDynamicDoc(Generic[T]):
def __init__(self, func: Callable[..., T], doc_tmpl: str) -> None:
self.__doc_tmpl__ = doc_tmpl
self.__func__ = func
self.__signature__ = signature(func)

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

0 comments on commit 42e4e4c

Please sign in to comment.