apache / apache/beam

Python typehints: support namedtuples

Open
#19,923 0 comments 0 reactions 0 assignees View on GitHub
bug core P3 python types
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

2 bugs:
1. convert_to_beam_type passes typing.NamedTuple as-is. The code that's supposed to convert it to Any is broken (and the test is buggy too).
Fix: https://github.com/apache/beam/pull/9754/files#diff-9b2eac354738047adddd44814d4b429cR247

2. Possible bug: collections.NamedTuple instances should also be converted to Any, or Tuple[Any, Any, ..], if other static types checker do this as well.

Imported from Jira [BEAM-8538](https://issues.apache.org/jira/browse/BEAM-8538). Original Jira may contain additional context.
Reported by: udim.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.