Skip to content

Commit 998efb4

Browse files
claudevdmClaude
authored andcommitted
Comments.
1 parent 9a486d4 commit 998efb4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sdks/python/apache_beam/transforms/ptransform_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,12 +1476,11 @@ def test_child_without_output_hints_infers_partial_types_from_dofn(self):
14761476
When a child transform has input hints but no output hints, type inference
14771477
from the DoFn's process method produces partially inferred types.
14781478
1479-
With .with_input_types(Tuple[K, V]) and actual input Tuple['a', 'hello'], K
1480-
binds to str from the input. However, without output hints, the DoFn's
1481-
yield statement inference produces Tuple[str, Any].
1479+
Type inference is able to infer the first element of the tuple as str, but
1480+
not the v.upper() and falls back to any.
14821481
"""
14831482
K = typehints.TypeVariable('K')
1484-
V = typehints.TypeVariable('K')
1483+
V = typehints.TypeVariable('V')
14851484

14861485
@typehints.with_input_types(typehints.Tuple[K, V])
14871486
@typehints.with_output_types(typehints.Tuple[K, V])

0 commit comments

Comments
 (0)