diff --git a/ci/code_checks.sh b/ci/code_checks.sh index a09c4662a1fd9..a91f8a881f3ba 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -159,7 +159,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.tseries.offsets.Milli\ pandas.tseries.offsets.Micro\ pandas.tseries.offsets.Nano\ - pandas.set_option\ pandas.Timestamp.max\ pandas.Timestamp.min\ pandas.Timestamp.resolution\ diff --git a/pandas/_config/config.py b/pandas/_config/config.py index bc9d289ddbaed..7612739531695 100644 --- a/pandas/_config/config.py +++ b/pandas/_config/config.py @@ -326,9 +326,9 @@ def __doc__(self) -> str: # type: ignore[override] """ _set_option_tmpl = """ -set_option(pat, value) +set_option(*args, **kwargs) -Sets the value of the specified option. +Sets the value of the specified option or options. Available options: @@ -336,13 +336,18 @@ def __doc__(self) -> str: # type: ignore[override] Parameters ---------- -pat : str - Regexp which should match a single option. - Note: partial matches are supported for convenience, but unless you use the - full option name (e.g. x.y.z.option_name), your code may break in future - versions if new options with similar names are introduced. -value : object - New value of option. +*args : str | object + Arguments provided in pairs, which will be interpreted as (pattern, value) + pairs. + pattern: str + Regexp which should match a single option + value: object + New value of option + Note: partial pattern matches are supported for convenience, but unless you + use the full option name (e.g. x.y.z.option_name), your code may break in + future versions if new options with similar names are introduced. +**kwargs : str + Keyword arguments are not currently supported. Returns ------- @@ -350,6 +355,8 @@ def __doc__(self) -> str: # type: ignore[override] Raises ------ +ValueError if odd numbers of non-keyword arguments are provided +TypeError if keyword arguments are provided OptionError if no such option exists Notes