Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
Open
Prev Previous commit
Next Next commit
fix PEP
  • Loading branch information
vlad-perevezentsev committed Sep 28, 2020
commit 2096e94276735671ca10a3a257634fcad23acb81
11 changes: 6 additions & 5 deletions numba_typing/test_overload_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ def check_type(typ):
return typ.__name__
return typ

value_keys = ", ".join(f"{key}" if not key in defaults_dict.keys()
value_keys = ", ".join(f"{key}" if key not in defaults_dict.keys()
else f"{key} = {defaults_dict[key]}" for key in values_dict.keys())
value_annotation = ", ".join(f"{key}: {check_type(val)}" if not key in defaults_dict.keys()
else f"{key}: {check_type(val)} = {defaults_dict[key]}" for key, val in values_dict.items())
value_annotation = ", ".join(f"{key}: {check_type(val)}" if key not in defaults_dict.keys()
else f"{key}: {check_type(val)} = {defaults_dict[key]}"
for key, val in values_dict.items())
value_type = ", ".join(f"{val}" for val in values_dict.values())
return_value_keys = ", ".join("{}".format(key) for key in values_dict.keys())
param_func = ", ".join(f"{val}" for val in param)
Expand Down Expand Up @@ -119,8 +120,8 @@ def test_typevar_types(self):
test_cases = [([1.0], {'a': 'T'}), ([False], {'a': 'T'}), (['list_numba', [1, 2]], {'a': 'T', 'b': 'T'}),
([1, 2.0], {'a': 'T', 'b': 'K'}), ([1], {'a': 'S'}), ([1.0], {'a': 'S'}),
([[True, True]], {'a': 'typing.List[T]'}), (['list_numba'], {'a': 'typing.List[T]'}),
([('str_variable', 2)], {'a': 'typing.Tuple[T,K]'}), (['dict_numba'], {'a': 'typing.Dict[K, T]'}),
(['dict_numba_1'], {'a': 'typing.Dict[K, T]'}),
([('str_variable', 2)], {'a': 'typing.Tuple[T,K]'}),
(['dict_numba_1'], {'a': 'typing.Dict[K, T]'}), (['dict_numba'], {'a': 'typing.Dict[K, T]'}),
(['list_in_dict_numba'], {'a': 'typing.Dict[K, typing.List[T]]'})]

for case in test_cases:
Expand Down