[
https://issues.apache.org/jira/browse/BEAM-10323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17183463#comment-17183463
]
Beam JIRA Bot commented on BEAM-10323:
--------------------------------------
This issue is P2 but has been unassigned without any comment for 60 days so it
has been labeled "stale-P2". If this issue is still affecting you, we care!
Please comment and remove the label. Otherwise, in 14 days the issue will be
moved to P3.
Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed
explanation of what these priorities mean.
> Python type hints: make WindowedValue, TimestampedValue Generic
> ---------------------------------------------------------------
>
> Key: BEAM-10323
> URL: https://issues.apache.org/jira/browse/BEAM-10323
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Udi Meiri
> Priority: P2
> Labels: stale-P2
>
> The above classes are used as return value wrappers, thus when converting
> return value annotations to type hints, the argument of these should be used
> as the hint.
> Example (this should pass but doesn't currently):
> {code}
> def test_timestamped_value(self):
> def timestamped(e: int) -> beam.window.TimestampedValue[int]:
> return beam.window.TimestampedValue(e, 0)
> with TestPipeline() as p:
> pcoll = p | beam.Create([1, 2, 3]) | beam.Map(timestamped)
> self.assertEqual(int, pcoll.element_type)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)