We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.12 introduced the type statement to define type aliases.
type
Using the type statement with apache-beam 2.60.0 generates an error however:
apache-beam
TypeError: Type hints for a PTransform must be a non-sequence, a type, or a TypeConstraint. InputType is an instance of TypeAliasType.
Reproducible example:
import apache_beam as beam type InputType = tuple[int, ...] def print_element(element: InputType) -> InputType: print(element) return element with beam.Pipeline() as pipeline: _ = pipeline | beam.Create([(1, 2)]).with_output_types(InputType) | beam.Map(print_element)
Using InputType: TypeAlias = tuple[int, ...] instead works fine.
InputType: TypeAlias = tuple[int, ...]
Priority: 2 (default / most bugs should be filed as P2)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What happened?
Python 3.12 introduced the
type
statement to define type aliases.Using the
type
statement withapache-beam
2.60.0 generates an error however:Reproducible example:
Using
InputType: TypeAlias = tuple[int, ...]
instead works fine.Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
The text was updated successfully, but these errors were encountered: