Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-8588

MapTuple(fn) fails if fn has type hints but no default args

Details

    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • None
    • None
    • sdk-py-core
    • None

    Description

        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))
      

      Fails in getcallargs_forhints_impl_py3 with:

      >       raise TypeCheckError(e)
      E       apache_beam.typehints.decorators.TypeCheckError: too many positional arguments
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            udim Udi Meiri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: