Skip to content

Commit e5d0422

Browse files
committed
mypy
1 parent 58aa4b2 commit e5d0422

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

branca/colormap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import json
1010
import math
1111
import os
12-
from typing import Dict, List, Optional, Sequence, Tuple, Union
12+
from typing import Dict, List, Optional, Sequence, Tuple, Union, Callable
1313

1414
from jinja2 import Template
1515

@@ -76,7 +76,7 @@ def _parse_color_as_numerical_sequence(x: Union[tuple, list]) -> TypeRGBAFloats:
7676
raise TypeError("Components in color sequence should all be int or float.")
7777
if not 3 <= len(x) <= 4:
7878
raise ValueError(f"Color sequence should have 3 or 4 elements, not {len(x)}.")
79-
conversion_function = float
79+
conversion_function: Callable = float
8080
if 1 < max(x) <= 255:
8181
conversion_function = _color_byte_to_normalized_float
8282
if min(x) < 0 or max(x) > 255:

0 commit comments

Comments
 (0)