Skip to content

Commit

Permalink
use Hashable type as dict key (instead of Any)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanschnell committed Jun 10, 2021
1 parent a949af1 commit 840ba92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bitarray/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class bitarray:


class frozenbitarray(bitarray):
...
def __hash__(self) -> int: ...


def bits2bytes(n: int, /) -> int: ...
Expand Down
6 changes: 3 additions & 3 deletions bitarray/util.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, AnyStr, BinaryIO, Literal, Optional, Union
from typing import Any, AnyStr, BinaryIO, Hashable, Literal, Optional, Union

from bitarray import bitarray

Expand Down Expand Up @@ -41,5 +41,5 @@ def int2ba(i: int, /,

def serialize(a: bitarray, /) -> bytes: ...
def deserialize(b: bytes, /) -> bitarray: ...
def huffman_code(freq_map: dict[Any, Union[int, float]],
endian: Optional[str] = ...) -> dict[Any, bitarray]: ...
def huffman_code(freq_map: dict[Hashable, Union[int, float]],
endian: Optional[str] = ...) -> dict[Hashable, bitarray]: ...

0 comments on commit 840ba92

Please sign in to comment.