Skip to content

Commit

Permalink
Silence some pytype errors.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 611601569
  • Loading branch information
rchen152 authored and Xarray-Beam authors committed Feb 29, 2024
1 parent 7f761b6 commit ad52a76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray_beam/_src/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def __init__(
raise ValueError(
f"chunks key {dim!r} is not a dimension on the provided dataset(s)"
)
expanded_chunks = normalize_expanded_chunks(chunks, self._first.sizes)
expanded_chunks = normalize_expanded_chunks(chunks, self._first.sizes) # pytype: disable=wrong-arg-types # always-use-property-annotation
self.expanded_chunks = expanded_chunks
self.split_vars = split_vars
self.num_threads = num_threads
Expand Down Expand Up @@ -395,7 +395,7 @@ def _iter_all_keys(self) -> Iterator[Key]:
relevant_offsets = {
k: v for k, v in self.offsets.items() if k in variable.dims
}
yield from iter_chunk_keys(relevant_offsets, vars={name})
yield from iter_chunk_keys(relevant_offsets, vars={name}) # pytype: disable=wrong-arg-types # always-use-property-annotation

def _iter_shard_keys(
self, shard_id: Optional[int], var_name: Optional[str]
Expand Down Expand Up @@ -429,7 +429,7 @@ def _shard_inputs(self) -> List[Tuple[Optional[int], Optional[str]]]:
inputs.extend([(i, name) for i in range(self.shard_count)])
else:
inputs.append((None, name))
return inputs
return inputs # pytype: disable=bad-return-type # always-use-property-annotation

def _key_to_chunks(self, key: Key) -> Iterator[Tuple[Key, DatasetOrDatasets]]:
"""Convert a Key into an in-memory (Key, xarray.Dataset) pair."""
Expand Down

0 comments on commit ad52a76

Please sign in to comment.