diff --git a/xarray/conventions.py b/xarray/conventions.py index ba495637d73..ff1256883ba 100644 --- a/xarray/conventions.py +++ b/xarray/conventions.py @@ -387,9 +387,7 @@ def _update_bounds_encoding(variables: T_Variables) -> None: T = TypeVar("T") -def _item_or_default( - obj: Mapping[Any, T] | T, key: Hashable, default: T -) -> T: +def _item_or_default(obj: Mapping[Any, T] | T, key: Hashable, default: T) -> T: """ Return item by key if obj is mapping and key is present, else return default value. """