Skip to content
New issue

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

Disable type checks for invalid method signatures. #106

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

Disable type checks for invalid method signatures.

These methods have a slightly wrong signature and cause pytype error when upgrading to a newer version of Xarray:

File "third_party/py/xee/ext.py", line 822, in EarthEngineBackendEntrypoint: Overriding method signature mismatch [signature-mismatch]
  Base signature: 'def xarray.backends.common.BackendEntrypoint.guess_can_open(self, filename_or_obj: Union[str, xarray.backends.common.AbstractDataStore, io.BufferedIOBase, os.PathLike[Any]]) -> bool'.
  Subclass signature: 'def EarthEngineBackendEntrypoint.guess_can_open(self, filename_or_obj: Union[str, os.PathLike[Any], ee.ImageCollection]) -> bool'.
  Type mismatch for parameter 'filename_or_obj'.
File "third_party/py/xee/ext.py", line 836, in EarthEngineBackendEntrypoint: Overriding method signature mismatch [signature-mismatch]
  Base signature: 'def xarray.backends.common.BackendEntrypoint.open_dataset(self, filename_or_obj: Union[str, xarray.backends.common.AbstractDataStore, io.BufferedIOBase, os.PathLike[Any]], *, drop_variables: Optional[Union[str, Iterable[str]]] = ..., **kwargs: Dict[Any, Any]) -> xarray.core.dataset.Dataset'.
  Subclass signature: 'def EarthEngineBackendEntrypoint.open_dataset(self, filename_or_obj: Union[str, os.PathLike[Any], ee.ImageCollection], drop_variables: Optional[Tuple[str, ...]] = None, io_chunks: Optional[Any] = None, n_images: int = -1, mask_and_scale: bool = True, decode_times: bool = True, decode_timedelta: Optional[bool] = None, use_cftime: Optional[bool] = None, concat_characters: bool = True, decode_coords: bool = True, crs: Optional[str] = None, scale: Optional[Union[float, int]] = None, projection: Optional[Any] = None, geometry: Optional[ee.Geometry] = None, primary_dim_name: Optional[str] = None, primary_dim_property: Optional[str] = None, ee_mask_value: Optional[float] = None, request_byte_limit: int = ...) -> xarray.core.dataset.Dataset'.
  Type mismatch for parameter 'filename_or_obj'.

There may be a better long-term fix, but disabling pytype is a simple way to keep this working for now.

Copy link
Collaborator

@alxmrs alxmrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant