MCPcopy
hub / github.com/pydata/xarray / warning_message

Method warning_message

xarray/util/deprecation_helpers.py:188–205  ·  view source on GitHub ↗
(self, message: str, recommend_set_options: bool = True)

Source from the content-addressed store, hash-verified

186 return normalize_token((type(self), self._value))
187
188 def warning_message(self, message: str, recommend_set_options: bool = True) -> str:
189 if recommend_set_options:
190 recommendation = (
191 " To opt in to new defaults and get rid of these warnings now "
192 "use `set_options(use_new_combine_kwarg_defaults=True) or "
193 f"set {self._name} explicitly."
194 )
195 else:
196 recommendation = (
197 f" The recommendation is to set {self._name} explicitly for this case."
198 )
199
200 return (
201 f"In a future version of xarray the default value for {self._name} will "
202 f"change from {self._name}={self._old!r} to {self._name}={self._new!r}. "
203 + message
204 + recommendation
205 )
206
207 def error_message(self) -> str:
208 return (

Callers 3

merge_collectedFunction · 0.80
process_subset_optFunction · 0.80
align_indexesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected