Skip to content

Commit 5300eb6

Browse files
fhoehleAvasam
andauthored
Add missing contextlib.contextmanager to sklearn.config_context (#393)
* add missing `contextlib.contextmanager` to `sklearn.config_context` * Update stubs/sklearn/_config.pyi Co-authored-by: Avasam <samuel.06@hotmail.com> --------- Co-authored-by: Avasam <samuel.06@hotmail.com>
1 parent 692c37c commit 5300eb6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

stubs/sklearn/_config.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from collections.abc import Iterator
1+
from collections.abc import Generator
2+
from contextlib import contextmanager
23
from typing import Literal
34

45
from ._typing import Int
@@ -19,6 +20,7 @@ def set_config(
1920
enable_metadata_routing: None | bool = None,
2021
skip_parameter_validation: None | bool = None,
2122
) -> None: ...
23+
@contextmanager
2224
def config_context(
2325
*,
2426
assume_finite: None | bool = None,
@@ -31,4 +33,4 @@ def config_context(
3133
transform_output: None | str = None,
3234
enable_metadata_routing: None | bool = None,
3335
skip_parameter_validation: None | bool = None,
34-
) -> Iterator[None]: ...
36+
) -> Generator[None, None, None]: ...

0 commit comments

Comments
 (0)