Skip to content

Commit d26e773

Browse files
Formatting
1 parent 639eb42 commit d26e773

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

pandas/_config/config.py

+20-19
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ def set_option(*args) -> None:
217217
.. warning::
218218
219219
Partial pattern matches are supported for convenience, but unless you
220-
use the full option name (e.g. ``x.y.z.option_name``), your code may break in
221-
future versions if new options with similar names are introduced.
220+
use the full option name (e.g. ``x.y.z.option_name``), your code may break
221+
in future versions if new options with similar names are introduced.
222222
223223
Returns
224224
-------
@@ -239,7 +239,7 @@ def set_option(*args) -> None:
239239
get_option : Retrieve the value of the specified option.
240240
reset_option : Reset one or more options to their default value.
241241
describe_option : Print the description for one or more registered options.
242-
option_context : Context manager to temporarily set options in a ``with`` statement.
242+
option_context : Context manager to temporarily set options in a `with` statement.
243243
244244
Notes
245245
-----
@@ -271,7 +271,7 @@ def set_option(*args) -> None:
271271
else:
272272
if not nargs or nargs % 2 != 0:
273273
raise ValueError(
274-
"Must provide an even number of non-keyword arguments or a single dictionary"
274+
"Must provide an even number of non-keyword arguments or a dictionary"
275275
)
276276
pairs = zip(args[::2], args[1::2])
277277

@@ -286,7 +286,8 @@ def set_option(*args) -> None:
286286
opt.cb(key)
287287

288288

289-
### Second Approach Supports both *args[pd.set_option(options)] and **kwargs[pd.set_option(**options)] where options=dict
289+
### Second Approach Supports both *args[pd.set_option(options)]
290+
### and **kwargs[pd.set_option(**options)] where options=dict
290291

291292

292293
# def set_option(*args, **kwargs) -> None:
@@ -301,17 +302,17 @@ def set_option(*args) -> None:
301302
# Options can be provided in any one of the following forms:
302303

303304
# 1. **Dictionary as a single positional argument:**
304-
# Pass a dictionary where each key is an option pattern and its corresponding value
305-
# is the new option value.
305+
# Pass a dictionary where each key is an option pattern and its corresponding
306+
# value is the new option value.
306307

307308
# Example:
308309

309310
# >>> pd.set_option({"display.max_columns": 4, "display.width": 80})
310311

311312
# 2. **Keyword arguments or dictionary unpacking:**
312-
# Pass options as keyword arguments, where each keyword is the option name and its
313-
# corresponding value is the new option value. This also supports dictionary unpacking
314-
# using the double asterisk syntax.
313+
# Pass options as keyword arguments, where each keyword is the option name and
314+
# its corresponding value is the new option value. This also supports
315+
# dictionary unpacking using the double asterisk syntax.
315316

316317
# Example:
317318

@@ -320,8 +321,8 @@ def set_option(*args) -> None:
320321
# >>> pd.set_option(**options)
321322

322323
# 3. **Traditional paired positional arguments:**
323-
# Provide an even number of positional arguments that are interpreted as (pattern, value)
324-
# pairs.
324+
# Provide an even number of positional arguments that are interpreted as
325+
# (pattern, value) pairs.
325326

326327
# Example:
327328

@@ -334,9 +335,9 @@ def set_option(*args) -> None:
334335
# - A single dictionary of options.
335336
# - Or an even number of arguments representing (pattern, value) pairs.
336337
# **kwargs : object
337-
# When provided, keyword arguments are treated as options where the keyword is the option
338-
# name and the value is the new option value. This includes dictionary unpacking using
339-
# the ** syntax.
338+
# When provided, keyword arguments are treated as options where the keyword
339+
# is the option name and the value is the new option value. This includes
340+
# dictionary unpacking using the ** syntax.
340341

341342
# Returns
342343
# -------
@@ -357,12 +358,12 @@ def set_option(*args) -> None:
357358
# get_option : Retrieve the value of the specified option.
358359
# reset_option : Reset one or more options to their default value.
359360
# describe_option : Print the description for one or more registered options.
360-
# option_context : Context manager to temporarily set options in a ``with`` statement.
361+
# option_context : Context manager to temporarily set options in a statement.
361362

362363
# Notes
363364
# -----
364-
# For a complete list of available options, please refer to the :ref:`User Guide <options.available>`
365-
# or use ``pandas.describe_option()``.
365+
# For a complete list of available options, please refer to the
366+
# :ref:`User Guide <options.available>` or use ``pandas.describe_option()``.
366367

367368
# Examples
368369
# --------
@@ -393,7 +394,7 @@ def set_option(*args) -> None:
393394
# else:
394395
# if not args or len(args) % 2 != 0:
395396
# raise ValueError(
396-
# "Must provide an even number of non-keyword arguments or a single dictionary"
397+
# "Must provide an even number of non-keyword arguments or a dict"
397398
# )
398399
# for key, value in zip(args[::2], args[1::2]):
399400
# _set_single_option(key, value)

0 commit comments

Comments
 (0)