Skip to content

add stub library for str2bool #12260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stubs/str2bool/METADATA.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version = "1.1"
upstream_repository = "https://github.com/symonsoft/str2bool"
7 changes: 7 additions & 0 deletions stubs/str2bool/str2bool/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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: ...