Skip to content

Commit

Permalink
Add missing typevar to python utils
Browse files Browse the repository at this point in the history
  • Loading branch information
hunhoffe committed Oct 14, 2024
1 parent 8087bd7 commit f83c852
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numbers
import os
from collections import defaultdict
from typing import List, Tuple, Dict, Set
from typing import List, Tuple, Dict, Set, TypeVar


def build_graph(max_cols, max_rows, target_model):
Expand Down Expand Up @@ -507,6 +507,9 @@ def _to_js(sizes_strides):
"""


E = TypeVar("E")


def single_elem_or_list_to_list(val: list[E] | E) -> list[T]:
"""does not work for list of lists but still useful"""
if not isinstance(val, list):
Expand Down

0 comments on commit f83c852

Please sign in to comment.