Skip to content

Commit

Permalink
Add mypy type hints to buffer-protocol classes in pyhmmer.easel
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Oct 25, 2024
1 parent fec78d0 commit fdfbbfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pyhmmer/easel.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Bitfield(typing.Sequence[bool]):
def __sizeof__(self) -> int: ...
def __copy__(self) -> Bitfield: ...
def __deepcopy__(self, memo: typing.Dict[int, object]) -> Bitfield: ...
def __buffer__(self, flags: int) -> memoryview: ...
def count(self, value: bool = True) -> int: ...
def copy(self) -> Bitfield: ...
def toggle(self, index: int) -> None: ...
Expand Down Expand Up @@ -142,6 +143,7 @@ class Vector(typing.Sequence[_T], typing.Generic[_T], abc.ABC):
def __sizeof__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
def __buffer__(self, flags: int) -> memoryview: ...
@property
def shape(self) -> typing.Tuple[int]: ...
@property
Expand Down Expand Up @@ -274,6 +276,7 @@ class Matrix(typing.Sequence[Vector[_T]], typing.Generic[_T], abc.ABC):
def __imul__(self: _M, other: typing.Union[_T, _M]) -> _M: ...
@abc.abstractmethod
def __repr__(self) -> str: ...
def __buffer__(self, flags: int) -> memoryview: ...
@property
def shape(self) -> typing.Tuple[int, int]: ...
@property
Expand Down Expand Up @@ -556,6 +559,7 @@ class TextSequence(Sequence):
def __reduce__(
self,
) -> typing.Tuple[typing.Type[TextSequence], typing.Tuple[object, ...]]: ...
def __buffer__(self, flags: int) -> memoryview: ...
@property
def sequence(self) -> str: ...
def copy(self) -> TextSequence: ...
Expand All @@ -580,6 +584,7 @@ class DigitalSequence(Sequence):
def __reduce__(
self,
) -> typing.Tuple[typing.Type[DigitalSequence], typing.Tuple[object, ...]]: ...
def __buffer__(self, flags: int) -> memoryview: ...
@property
def sequence(self) -> VectorU8: ...
def copy(self) -> DigitalSequence: ...
Expand Down

0 comments on commit fdfbbfb

Please sign in to comment.