Skip to content

Commit 4d189cb

Browse files
committed
fix(.pyi): xxh64 is a separate C type, not an alias for xxh3_64
xxh64 uses the classic XXH64 algorithm (XXH64_state_t) while xxh3_64 uses the XXH3 algorithm. The .pyi incorrectly declared them as type aliases, lying to type checkers. xxh128 = xxh3_128 remains correct, that's a real Python-level alias.
1 parent 8114fd1 commit 4d189cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

xxhash/__init__.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ class _Hasher:
6464
@final
6565
class xxh32(_Hasher): ...
6666

67+
@final
68+
class xxh64(_Hasher): ...
69+
6770
@final
6871
class xxh3_64(_Hasher): ...
6972

7073
@final
7174
class xxh3_128(_Hasher): ...
7275

73-
xxh64 = xxh3_64
7476
xxh128 = xxh3_128
7577

7678
def xxh32_digest(data: _DataType, seed: int = ...) -> bytes: ...

0 commit comments

Comments
 (0)