Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cid/cid.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import cast

from morphys import ensure_bytes, ensure_unicode
import multibase
import multicodec
Expand Down Expand Up @@ -275,7 +277,7 @@ def from_bytes(cidbytes: bytes) -> CIDv0 | CIDv1:
# refer: https://github.com/ipld/cid/issues/13#issuecomment-326490275
if cidbytes[0] != 0 and multibase.is_encoded(cidbytes):
# if the bytestream is multibase encoded
cid = multibase.decode(cidbytes)
cid = cast(bytes, multibase.decode(cidbytes))

if len(cid) < 2:
msg = "cid length is invalid"
Expand Down
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ classifiers = [
]
requires-python = ">=3.10"
dependencies = [
"py-multibase>=1.0.0,<2.0.0",
"py-multicodec<0.3.0",
"py-multibase>=1.0.0",
"py-multicodec>=0.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be py-multicodec>=1.0.0

"morphys>=1.0,<2.0",
"py-multihash>=2.0.0",
]
Expand Down Expand Up @@ -66,10 +66,6 @@ dev = [
"pyrefly>=0.17.1,<0.18.0",
]

docs = [
"sphinx>=7.0.0",
]

[tool.setuptools]
include-package-data = true
zip-safe = false
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ commands=
[testenv:docs]
extras=
.
docs
dev
commands =
make check-docs-ci

Expand Down