Skip to content

Commit 77273f4

Browse files
committed
fix lint: lowercase variable name, add install hints for missing writers
Signed-off-by: yashnaiduu <yashnaiduu@users.noreply.github.com>
1 parent 1191cbc commit 77273f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

monai/data/image_writer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def resolve_writer(ext_name, error_if_not_found=True) -> Sequence:
117117
avail_writers.append(_writer)
118118
if not avail_writers and error_if_not_found:
119119
# map common extensions to their required package
120-
_INSTALL_HINTS: dict = {
120+
install_hints: dict = {
121121
"nii": "nibabel",
122122
"nii.gz": "nibabel",
123123
"mha": "itk",
@@ -130,7 +130,7 @@ def resolve_writer(ext_name, error_if_not_found=True) -> Sequence:
130130
"tiff": "pillow",
131131
"bmp": "pillow",
132132
}
133-
hint = _INSTALL_HINTS.get(fmt)
133+
hint = install_hints.get(fmt)
134134
extra = f" Try installing the required package: pip install {hint}" if hint else ""
135135
raise OptionalImportError(f"No ImageWriter backend found for '{fmt}'.{extra}")
136136
writer_tuple = ensure_tuple(avail_writers)

0 commit comments

Comments
 (0)