Conversation
d4ca830 to
4fec00e
Compare
4fec00e to
9e22cc1
Compare
20c8c9f to
d2ab1e6
Compare
983d8c2 to
f209bbf
Compare
34a780c to
88e35dc
Compare
34d8931 to
4f0530b
Compare
645704c to
402c16b
Compare
22e2e16 to
b907903
Compare
b907903 to
cf587a2
Compare
3657f83 to
caab8f5
Compare
caab8f5 to
26eca38
Compare
26eca38 to
b02cf3f
Compare
96a7fa2 to
aecd339
Compare
fb03ce7 to
e50da9b
Compare
d0c3415 to
178cb6f
Compare
9365969 to
271b943
Compare
271b943 to
43ea67e
Compare
43ea67e to
8aa51f9
Compare
8aa51f9 to
df8edc8
Compare
df8edc8 to
ddadf58
Compare
cf53f06 to
b35a77d
Compare
b35a77d to
0624298
Compare
updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0) - [github.com/psf/black-pre-commit-mirror: 25.1.0 → 25.12.0](psf/black-pre-commit-mirror@25.1.0...25.12.0) - [github.com/astral-sh/ruff-pre-commit: v0.11.2 → v0.14.10](astral-sh/ruff-pre-commit@v0.11.2...v0.14.10) - [github.com/PyCQA/isort: 6.0.1 → 7.0.0](PyCQA/isort@6.0.1...7.0.0) - [github.com/asottile/pyupgrade: v3.19.1 → v3.21.2](asottile/pyupgrade@v3.19.1...v3.21.2) - [github.com/adamchainz/blacken-docs: 1.19.1 → 1.20.0](adamchainz/blacken-docs@1.19.1...1.20.0) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.19.1](pre-commit/mirrors-mypy@v1.15.0...v1.19.1)
0624298 to
d067fc8
Compare
src/dask_awkward/lib/io/io.py
Outdated
| raise ValueError("divisions must be a tuple of length len(source) + 1") | ||
| hlg = HighLevelGraph.from_collections(name, dsk, dependencies=parts) | ||
| hlg = HighLevelGraph.from_collections( | ||
| name, dsk, dependencies=cast("Sequence[DaskCollection]", parts) |
There was a problem hiding this comment.
@martindurant I'm not an expert at python typing. I used cast here as from_collections expects a sequence of DaskCollection but I could have just instructed mypy to ignore this line. What do you think? mypy complains with error: Argument "dependencies" to "from_collections" of "HighLevelGraph" has incompatible type "list[Delayed]"; expected "Sequence[DaskCollection]" [arg-type]
There was a problem hiding this comment.
Even though Delayed is indeed a collection and list is indeed a sequence.
For me, when you start having to cast() here and there, you may as well be ignoring... That might be because I don't know how to do it well either!
There was a problem hiding this comment.
yeah since dask wants a DaskCollection type, I would have expected that all dask collections like array etc inherit from this protocol, but they don't......anyways, let me switch to ignore.
src/dask_awkward/lib/io/io.py
Outdated
| layer = AwkwardBlockwiseLayer.from_blockwise(layer) | ||
| hlg = HighLevelGraph.from_collections(name, layer, dependencies=[array]) | ||
| hlg = HighLevelGraph.from_collections( | ||
| name, layer, dependencies=cast("Sequence[DaskCollection]", [array]) |
updates: