add stub library for str2bool (#12260)

This commit is contained in:
ZivRonen
2024-07-04 06:30:32 +03:00
committed by GitHub
parent 0d2b9dfe12
commit 2ea26f7da6
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
version = "1.1"
upstream_repository = "https://github.com/symonsoft/str2bool"

View File

@@ -0,0 +1,7 @@
from typing import Literal, overload
@overload
def str2bool(value: str, raise_exc: Literal[True]) -> bool: ...
@overload
def str2bool(value: str, raise_exc: bool = False) -> bool | None: ...
def str2bool_exc(value: str) -> bool: ...