mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
add stub library for str2bool (#12260)
This commit is contained in:
2
stubs/str2bool/METADATA.toml
Normal file
2
stubs/str2bool/METADATA.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
version = "1.1"
|
||||
upstream_repository = "https://github.com/symonsoft/str2bool"
|
||||
7
stubs/str2bool/str2bool/__init__.pyi
Normal file
7
stubs/str2bool/str2bool/__init__.pyi
Normal 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: ...
|
||||
Reference in New Issue
Block a user