You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Udi Meiri (Jira)" <ji...@apache.org> on 2019/11/08 00:36:00 UTC
[jira] [Created] (BEAM-8588) MapTuple(fn) fails if fn has type
hints but no default args
Udi Meiri created BEAM-8588:
-------------------------------
Summary: MapTuple(fn) fails if fn has type hints but no default args
Key: BEAM-8588
URL: https://issues.apache.org/jira/browse/BEAM-8588
Project: Beam
Issue Type: Bug
Components: sdk-py-core
Reporter: Udi Meiri
Assignee: Udi Meiri
{code}
def test_typed_maptuple(self):
def fn(e1: int, e2: int) -> int:
return e1 * e2
result = [(1, 1), (2, 2)] | beam.MapTuple(fn)
self.assertEqual([2, 4], sorted(result))
{code}
Fails in getcallargs_forhints_impl_py3 with:
{code}
> raise TypeCheckError(e)
E apache_beam.typehints.decorators.TypeCheckError: too many positional arguments
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)