diff --git a/stubs/lzstring/@tests/stubtest_allowlist.txt b/stubs/lzstring/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..3f24b90e8 --- /dev/null +++ b/stubs/lzstring/@tests/stubtest_allowlist.txt @@ -0,0 +1,6 @@ +# Internal implementation details that are intentionally missing from stub +lzstring.keyStrBase64 +lzstring.keyStrUriSafe +lzstring.baseReverseDic +lzstring.Object +lzstring.getBaseValue diff --git a/stubs/lzstring/METADATA.toml b/stubs/lzstring/METADATA.toml new file mode 100644 index 000000000..01227b100 --- /dev/null +++ b/stubs/lzstring/METADATA.toml @@ -0,0 +1,2 @@ +version = "1.0.*" +upstream_repository = "https://github.com/gkovacs/lz-string-python" diff --git a/stubs/lzstring/lzstring/__init__.pyi b/stubs/lzstring/lzstring/__init__.pyi new file mode 100644 index 000000000..8d66d865b --- /dev/null +++ b/stubs/lzstring/lzstring/__init__.pyi @@ -0,0 +1,17 @@ +class LZString: + @staticmethod + def compress(uncompressed: str | None) -> str: ... + @staticmethod + def compressToUTF16(uncompressed: str | None) -> str: ... + @staticmethod + def compressToBase64(uncompressed: str | None) -> str: ... + @staticmethod + def compressToEncodedURIComponent(uncompressed: str | None) -> str: ... + @staticmethod + def decompress(compressed: str | None) -> str | None: ... + @staticmethod + def decompressFromUTF16(compressed: str | None) -> str | None: ... + @staticmethod + def decompressFromBase64(compressed: str | None) -> str | None: ... + @staticmethod + def decompressFromEncodedURIComponent(compressed: str | None) -> str | None: ...