Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ extend-select = [
"PIE", # flake8-pie
"TID", # flake8-tidy-imports (absolute imports)
"PYI", # flake8-pyi
"FLY", # flynt
"I", # isort
"PERF", # Perflint
"W", # pycodestyle warnings
Expand Down
2 changes: 1 addition & 1 deletion xarray/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _iris_cell_methods_to_str(cell_methods_obj):
f"interval: {interval}" for interval in cell_method.intervals
)
comments = " ".join(f"comment: {comment}" for comment in cell_method.comments)
extra = " ".join([intervals, comments]).strip()
extra = f"{intervals} {comments}".strip()
if extra:
extra = f" ({extra})"
cell_methods.append(names + cell_method.method + extra)
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def extra_items_repr(extra_keys, mapping, ab_side, kwargs):
attrs_summary.append(attr_s)

temp = [
"\n".join([var_s, attr_s]) if attr_s else var_s
f"{var_s}\n{attr_s}" if attr_s else var_s
for var_s, attr_s in zip(temp, attrs_summary, strict=True)
]

Expand Down
4 changes: 2 additions & 2 deletions xarray/tests/test_cftime_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def test_to_offset_annual(month_label, month_int, multiple, offset_str):
freq = offset_str
offset_type = _ANNUAL_OFFSET_TYPES[offset_str]
if month_label:
freq = "-".join([freq, month_label])
freq = f"{freq}-{month_label}"
if multiple:
freq = f"{multiple}{freq}"
result = to_offset(freq)
Expand Down Expand Up @@ -303,7 +303,7 @@ def test_to_offset_quarter(month_label, month_int, multiple, offset_str):
freq = offset_str
offset_type = _QUARTER_OFFSET_TYPES[offset_str]
if month_label:
freq = "-".join([freq, month_label])
freq = f"{freq}-{month_label}"
if multiple:
freq = f"{multiple}{freq}"
result = to_offset(freq)
Expand Down
Loading