Skip to content

Commit f120459

Browse files
committed
removed redundant single pair handling
1 parent 7167a6b commit f120459

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

pandas/_config/config.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -266,23 +266,6 @@ def set_option(*args) -> None:
266266
if len(args) == 1 and isinstance(args[0], dict):
267267
args = tuple(kv for item in args[0].items() for kv in item)
268268

269-
# Handle single option-value pair
270-
if len(args) == 2:
271-
key = _get_single_key(args[0])
272-
v = args[1]
273-
274-
opt = _get_registered_option(key)
275-
if opt and opt.validator:
276-
opt.validator(v)
277-
278-
# walk the nested dict
279-
root, k_root = _get_root(key)
280-
root[k_root] = v
281-
282-
if opt.cb:
283-
opt.cb(key)
284-
return
285-
286269
nargs = len(args)
287270
if not nargs or nargs % 2 != 0:
288271
raise ValueError("Must provide an even number of non-keyword arguments")

0 commit comments

Comments
 (0)