Skip to content

Commit

Permalink
Merge branch 'granular-mask-and-scale' of github.com:Ostheer/xarray i…
Browse files Browse the repository at this point in the history
…nto granular-mask-and-scale
  • Loading branch information
Mathijs Verhaegh committed Jul 13, 2024
2 parents 5eecad1 + 0f1e432 commit 11a60e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Empty file added properties/__init__.py
Empty file.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING"]
[tool.mypy]
enable_error_code = "redundant-self"
exclude = [
'build',
'xarray/util/generate_.*\.py',
'xarray/datatree_/doc/.*\.py',
]
Expand Down
4 changes: 3 additions & 1 deletion xarray/conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ def _update_bounds_encoding(variables: T_Variables) -> None:
T = TypeVar("T")


def _item_or_default(obj: Mapping[Any, T] | T, key: Hashable, default: T | None = None) -> T | None:
def _item_or_default(
obj: Mapping[Any, T] | T, key: Hashable, default: T | None = None
) -> T | None:
"""
Return item by key if obj is mapping and key is present, else return default value.
"""
Expand Down

0 comments on commit 11a60e3

Please sign in to comment.