Skip to content

Commit 99724e9

Browse files
pacrobacul71
andauthored
open multibase and multicodec upper pins, prep for release (#53)
* open multibase and multicodec upper pins, remove docs tox header with duplicate sphinx dep * Fix type errors in cid.py: add cast for multibase.decode return type --------- Co-authored-by: acul71 <[email protected]>
1 parent b13b517 commit 99724e9

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

cid/cid.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import cast
2+
13
from morphys import ensure_bytes, ensure_unicode
24
import multibase
35
import multicodec
@@ -275,7 +277,7 @@ def from_bytes(cidbytes: bytes) -> CIDv0 | CIDv1:
275277
# refer: https://github.com/ipld/cid/issues/13#issuecomment-326490275
276278
if cidbytes[0] != 0 and multibase.is_encoded(cidbytes):
277279
# if the bytestream is multibase encoded
278-
cid = multibase.decode(cidbytes)
280+
cid = cast(bytes, multibase.decode(cidbytes))
279281

280282
if len(cid) < 2:
281283
msg = "cid length is invalid"

pyproject.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ classifiers = [
3131
]
3232
requires-python = ">=3.10"
3333
dependencies = [
34-
"py-multibase>=1.0.0,<2.0.0",
35-
"py-multicodec<0.3.0",
34+
"py-multibase>=1.0.0",
35+
"py-multicodec>=0.3.0",
3636
"morphys>=1.0,<2.0",
3737
"py-multihash>=2.0.0",
3838
]
@@ -66,10 +66,6 @@ dev = [
6666
"pyrefly>=0.17.1,<0.18.0",
6767
]
6868

69-
docs = [
70-
"sphinx>=7.0.0",
71-
]
72-
7369
[tool.setuptools]
7470
include-package-data = true
7571
zip-safe = false

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ commands=
6161
[testenv:docs]
6262
extras=
6363
.
64-
docs
64+
dev
6565
commands =
6666
make check-docs-ci
6767

0 commit comments

Comments
 (0)