Fixed license error
This commit is contained in:
@@ -28,7 +28,7 @@ __all__ = [
|
||||
def is_number(string: str, base: int = 10) -> bool:
|
||||
'''
|
||||
Checks whether the string is a number.
|
||||
|
||||
|
||||
:param string: The string
|
||||
:type string: str
|
||||
:param base: The base
|
||||
@@ -48,7 +48,7 @@ def is_number(string: str, base: int = 10) -> bool:
|
||||
def int_to_bytes(n: int, signed: bool = False) -> bytes:
|
||||
'''
|
||||
Converts the integer into bytes (dynamic length).
|
||||
|
||||
|
||||
:param n: The integer
|
||||
:type n: int
|
||||
:param signed: Whether the integer is signed or not.
|
||||
@@ -76,7 +76,7 @@ def _bits_to_byte(bits: Tuple[Literal[0, 1], Literal[0, 1], Literal[0, 1], Liter
|
||||
def bits_to_byte(*bits: Literal[0, 1]) -> bytes:
|
||||
'''
|
||||
Converts the bits into a single byte.
|
||||
|
||||
|
||||
:param bits: The bits
|
||||
:type bits: int
|
||||
|
||||
@@ -94,7 +94,7 @@ def bits_to_byte(*bits: Literal[0, 1]) -> bytes:
|
||||
def byte_to_bits(b: bytes) -> Tuple[Literal[0, 1], Literal[0, 1], Literal[0, 1], Literal[0, 1], Literal[0, 1], Literal[0, 1], Literal[0, 1], Literal[0, 1]]:
|
||||
'''
|
||||
Converts the byte to a tuple of bits.
|
||||
|
||||
|
||||
:param b: The byte
|
||||
:type b: bytes
|
||||
|
||||
@@ -111,7 +111,7 @@ def byte_to_bits(b: bytes) -> Tuple[Literal[0, 1], Literal[0, 1], Literal[0, 1],
|
||||
def get_next_lower_integer_multiple(value: int, multiple: int) -> int:
|
||||
'''
|
||||
Returns the next lower integer multiple.
|
||||
|
||||
|
||||
:param value: The value
|
||||
:type value: int
|
||||
:param multiple: The factor
|
||||
@@ -125,7 +125,7 @@ def get_next_lower_integer_multiple(value: int, multiple: int) -> int:
|
||||
def find_nearest_lower_number(number_list: Sequence, target: int | float) -> int | float:
|
||||
'''
|
||||
Finds the nearest lower number to the target from the list.
|
||||
|
||||
|
||||
:param number_list: The list
|
||||
:type number_list: Sequence
|
||||
:param target: The target
|
||||
@@ -144,7 +144,7 @@ def find_nearest_lower_number(number_list: Sequence, target: int | float) -> int
|
||||
def create_file_if_not_exists(path: str, content: bytes = b''):
|
||||
'''
|
||||
Creates a file if it does not exist.
|
||||
|
||||
|
||||
:param path: The file path
|
||||
:type path: str
|
||||
:param content: Optional, the content of the file if it is newly created.
|
||||
|
||||
Reference in New Issue
Block a user