diff --git a/stubs/binaryornot/@tests/stubtest_allowlist.txt b/stubs/binaryornot/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000000..742a3bb53e80 --- /dev/null +++ b/stubs/binaryornot/@tests/stubtest_allowlist.txt @@ -0,0 +1 @@ +binaryornot\..+?\.logger diff --git a/stubs/binaryornot/METADATA.toml b/stubs/binaryornot/METADATA.toml new file mode 100644 index 000000000000..bc45896c1a04 --- /dev/null +++ b/stubs/binaryornot/METADATA.toml @@ -0,0 +1,2 @@ +version = "0.4.*" +upstream_repository = "https://github.com/binaryornot/binaryornot" diff --git a/stubs/binaryornot/binaryornot/__init__.pyi b/stubs/binaryornot/binaryornot/__init__.pyi new file mode 100644 index 000000000000..4c304c608dbc --- /dev/null +++ b/stubs/binaryornot/binaryornot/__init__.pyi @@ -0,0 +1,5 @@ +from typing import Final + +__author__: Final[str] +__email__: Final[str] +__version__: Final[str] diff --git a/stubs/binaryornot/binaryornot/check.pyi b/stubs/binaryornot/binaryornot/check.pyi new file mode 100644 index 000000000000..8ebb58019b10 --- /dev/null +++ b/stubs/binaryornot/binaryornot/check.pyi @@ -0,0 +1,3 @@ +from _typeshed import StrOrBytesPath + +def is_binary(filename: StrOrBytesPath) -> bool: ... diff --git a/stubs/binaryornot/binaryornot/helpers.pyi b/stubs/binaryornot/binaryornot/helpers.pyi new file mode 100644 index 000000000000..4534c3ffe99c --- /dev/null +++ b/stubs/binaryornot/binaryornot/helpers.pyi @@ -0,0 +1,5 @@ +from _typeshed import StrOrBytesPath + +def print_as_hex(s: str) -> None: ... +def get_starting_chunk(filename: StrOrBytesPath, length: int = 1024) -> bytes: ... +def is_binary_string(bytes_to_check: bytes | bytearray) -> bool: ...