mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Fix strtobool type annotation (#6970)
Problem: strtobool returns either 0 or 1, not bool. Solution: Fix type annotation.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import Any, Callable, Mapping
|
||||
from typing_extensions import Literal
|
||||
|
||||
def get_platform() -> str: ...
|
||||
def convert_path(pathname: str) -> str: ...
|
||||
@@ -9,7 +10,7 @@ def split_quoted(s: str) -> list[str]: ...
|
||||
def execute(
|
||||
func: Callable[..., None], args: tuple[Any, ...], msg: str | None = ..., verbose: bool = ..., dry_run: bool = ...
|
||||
) -> None: ...
|
||||
def strtobool(val: str) -> bool: ...
|
||||
def strtobool(val: str) -> Literal[0, 1]: ...
|
||||
def byte_compile(
|
||||
py_files: list[str],
|
||||
optimize: int = ...,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Callable, Container, Iterable, Mapping
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
def get_platform() -> str: ...
|
||||
def convert_path(pathname: str) -> str: ...
|
||||
@@ -11,7 +12,7 @@ def split_quoted(s: str) -> list[str]: ...
|
||||
def execute(
|
||||
func: Callable[..., None], args: tuple[Any, ...], msg: str | None = ..., verbose: bool = ..., dry_run: bool = ...
|
||||
) -> None: ...
|
||||
def strtobool(val: str) -> bool: ...
|
||||
def strtobool(val: str) -> Literal[0, 1]: ...
|
||||
def byte_compile(
|
||||
py_files: list[str],
|
||||
optimize: int = ...,
|
||||
|
||||
Reference in New Issue
Block a user