-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and modify files for the project
- Updated files: - src/bee_py/bee.py - src/bee_py/chunk/serialize.py - src/bee_py/modules/bytes.py - src/bee_py/types/type.py - src/bee_py/utils/http.py - src/bee_py/utils/type.py - tests/conftest.py - tests/unit/chunk/test_soc.py - tests/unit/test_bee.py
- Loading branch information
1 parent
c41d6ac
commit d38a55e
Showing
9 changed files
with
143 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
from collections.abc import ByteString, Sequence | ||
from itertools import chain | ||
# from collections.abc import ByteString, Sequence | ||
# from itertools import chain | ||
|
||
|
||
def serialize_bytes(*arrays: Sequence[ByteString]) -> ByteString: | ||
def serialize_bytes(*arrays: bytes) -> bytes: | ||
""" | ||
Serializes a sequence of byte arrays into a single byte array. | ||
Args: | ||
*arrays (Sequence[ByteString]): The sequence of byte arrays to serialize. | ||
*arrays (bytes): The sequence of byte arrays to serialize. | ||
Returns: | ||
ByteString: The serialized byte array. | ||
""" | ||
flattened_bytes = chain.from_iterable(arrays) | ||
return bytes(flattened_bytes) | ||
return b"".join(arrays) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.