Skip to content

Commit 2ea26f7

Browse files
authored
add stub library for str2bool (#12260)
1 parent 0d2b9df commit 2ea26f7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

stubs/str2bool/METADATA.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version = "1.1"
2+
upstream_repository = "https://github.com/symonsoft/str2bool"

stubs/str2bool/str2bool/__init__.pyi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from typing import Literal, overload
2+
3+
@overload
4+
def str2bool(value: str, raise_exc: Literal[True]) -> bool: ...
5+
@overload
6+
def str2bool(value: str, raise_exc: bool = False) -> bool | None: ...
7+
def str2bool_exc(value: str) -> bool: ...

0 commit comments

Comments
 (0)