Skip to content

Commit

Permalink
Make mypy happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Feb 25, 2025
1 parent b98e331 commit 911a3be
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sdks/python/apache_beam/yaml/yaml_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from collections.abc import Iterable
from collections.abc import Mapping
from typing import Any
from typing import Optional
from typing import NamedTuple
from typing import Optional
from typing import TypeVar
from typing import Union

Expand Down Expand Up @@ -849,7 +849,7 @@ class PaneInfoTuple(NamedTuple):
is_first: bool
is_last: bool
timing: str
index: int
index: int # type: ignore[assignment]
nonspeculative_index: int

@classmethod
Expand Down Expand Up @@ -886,7 +886,8 @@ def from_pane_info(cls, pane_info):


@beam.ptransform.ptransform_fn
def _ExtractWindowingInfo(pcoll, fields: Optional[Union[Mapping[str, str], Iterable[str]]] = None):
def _ExtractWindowingInfo(
pcoll, fields: Optional[Union[Mapping[str, str], Iterable[str]]] = None):
"""
Extracts the implicit windowing information from an element and makes it
explicit as field(s) in the element itself.
Expand Down Expand Up @@ -943,7 +944,8 @@ def augment_row(
return beam.Row(**as_dict)

return pcoll | beam.Map(augment_row).with_output_types(
row_type.RowTypeConstraint.from_fields(existing_fields + new_fields))
row_type.RowTypeConstraint.from_fields(
existing_fields + new_fields)) # type: ignore[operator]


def create_mapping_providers():
Expand Down

0 comments on commit 911a3be

Please sign in to comment.