We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be9a235 commit 0f27fb2Copy full SHA for 0f27fb2
cf_xarray/accessor.py
@@ -313,11 +313,13 @@ def _get_list_standard_names(obj: xr.Dataset) -> List[str]:
313
-------
314
list of standard names in dataset
315
"""
316
- names = []
317
- for k, v in obj.variables.items():
318
- if "standard_name" in v.attrs:
319
- names.append(v.attrs["standard_name"])
320
- return sorted(names)
+ return sorted(
+ [
+ v.attrs["standard_name"]
+ for k, v in obj.variables.items()
+ if "standard_name" in v.attrs
321
+ ]
322
+ )
323
324
325
def _getattr(
0 commit comments