Type hint correctly
This commit is contained in:
parent
483587fd3b
commit
f9d8470ee6
|
@ -2,6 +2,8 @@ import ctypes as c
|
||||||
|
|
||||||
from array import array
|
from array import array
|
||||||
|
|
||||||
|
from typing import *
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -26,7 +28,7 @@ class Bitstream:
|
||||||
self._offset += 1
|
self._offset += 1
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def read_bit(self) -> (bool, bool):
|
def read_bit(self) -> Tuple[bool, bool]:
|
||||||
if not self._can_access_bits(1):
|
if not self._can_access_bits(1):
|
||||||
return False, False
|
return False, False
|
||||||
|
|
||||||
|
@ -68,7 +70,7 @@ class Bitstream:
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def read(self, bit_length: int) -> (bool, bytes):
|
def read(self, bit_length: int) -> Tuple[bool, bytes]:
|
||||||
if not self._can_access_bits(bit_length):
|
if not self._can_access_bits(bit_length):
|
||||||
return False, b""
|
return False, b""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user