You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Danny McCormick (Jira)" <ji...@apache.org> on 2022/06/04 13:45:00 UTC
[jira] [Commented] (BEAM-8588) MapTuple(fn) fails if fn has type hints but no default args
[ https://issues.apache.org/jira/browse/BEAM-8588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17548196#comment-17548196 ]
Danny McCormick commented on BEAM-8588:
---------------------------------------
This issue has been migrated to https://github.com/apache/beam/issues/19843
> 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
> Priority: P3
>
> {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.20.7#820007)