(self, message: str, recommend_set_options: bool = True)
| 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 ( |
no outgoing calls
no test coverage detected