Skip to content

Commit

Permalink
Avoid shadowing builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
aazuspan committed Jan 23, 2025
1 parent 1f0f934 commit 214b815
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eerepr/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _build_pixeltype_label(obj: dict) -> str:
prec = obj.get("precision", "")
minimum = str(obj.get("min", ""))
maximum = str(obj.get("max", ""))
range = f"[{minimum}, {maximum}]"
val_range = f"[{minimum}, {maximum}]"

type_ranges = {
"[-128, 127]": "signed int8",
Expand All @@ -187,9 +187,9 @@ def _build_pixeltype_label(obj: dict) -> str:
if prec in ["double", "float"]:
return prec
try:
return type_ranges[range]
return type_ranges[val_range]
except KeyError:
return f"{prec}{range}"
return f"{prec}{val_range}"


def _build_band_label(obj: dict) -> str:
Expand Down

0 comments on commit 214b815

Please sign in to comment.