Skip to content

Commit 75d9987

Browse files
authored
Loosen type constraint on data in make_dict_of_named_arrays (#605)
1 parent a9863e7 commit 75d9987

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

.basedpyright/baseline.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27069,14 +27069,6 @@
2706927069
"lineCount": 1
2707027070
}
2707127071
},
27072-
{
27073-
"code": "reportUnknownParameterType",
27074-
"range": {
27075-
"startColumn": 8,
27076-
"endColumn": 16,
27077-
"lineCount": 1
27078-
}
27079-
},
2708027072
{
2708127073
"code": "reportUnknownParameterType",
2708227074
"range": {

pytato/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,7 @@ def reshape(array: Array, newshape: int | Sequence[int],
23782378

23792379
# {{{ make_dict_of_named_arrays
23802380

2381-
def make_dict_of_named_arrays(data: dict[str, Array], *,
2381+
def make_dict_of_named_arrays(data: Mapping[str, Array], *,
23822382
tags: frozenset[Tag] = frozenset()
23832383
) -> DictOfNamedArrays:
23842384
"""Make a :class:`DictOfNamedArrays` object.

test/test_codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ def bar(tracer, x, y):
19851985
foo_x_y = tracer(partial(foo, tracer), x, y, identifier="foo")
19861986
return foo_x_y * x * y
19871987

1988-
def call_bar(tracer, x, y):
1988+
def call_bar(tracer, x, y) -> pt.Array:
19891989
return tracer(partial(bar, tracer), x, y, identifier="bar")
19901990

19911991
x1_np, y1_np = rng.random((2, 13, 29))

0 commit comments

Comments
 (0)