From 773f7ec3b0aab0a057f3855a75eddd655552ec3b Mon Sep 17 00:00:00 2001 From: Advit Arora Date: Wed, 19 Aug 2026 01:22:53 +0530 Subject: [PATCH] [configparser] Narrow `RawConfigParser.values()` to `SectionProxy` --- stdlib/configparser.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/configparser.pyi b/stdlib/configparser.pyi index 385336ec154a..095df4368660 100644 --- a/stdlib/configparser.pyi +++ b/stdlib/configparser.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import BytesPath, GenericPath, MaybeNone, StrOrBytesPath, StrPath, SupportsWrite -from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence +from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence, ValuesView from re import Pattern from typing import Any, AnyStr, ClassVar, Final, Literal, TypeAlias, TypeVar, overload, type_check_only from typing_extensions import deprecated @@ -333,6 +333,7 @@ class RawConfigParser(_Parser): @overload def items(self, section: _SectionName, raw: bool = False, vars: _Section | None = None) -> list[tuple[str, str]]: ... + def values(self) -> ValuesView[SectionProxy]: ... def set(self, section: _SectionName, option: str, value: str | None = None) -> None: ... def write(self, fp: SupportsWrite[str], space_around_delimiters: bool = True) -> None: ... def remove_option(self, section: _SectionName, option: str) -> bool: ...