Fix strtobool type annotation (#6970)

Problem: strtobool returns either 0 or 1, not bool.

Solution: Fix type annotation.
This commit is contained in:
Christian Bundy
2022-01-19 21:57:47 -08:00
committed by GitHub
parent 1f000d2881
commit 4d085fbfc1
2 changed files with 4 additions and 2 deletions

View File

@@ -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 = ...,

View File

@@ -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 = ...,