diff --git a/privates/named_struct.py b/privates/named_struct.py index 0e8bba0..49cd2dd 100644 --- a/privates/named_struct.py +++ b/privates/named_struct.py @@ -142,9 +142,6 @@ def items(cls): @classmethod def create(cls, **kwargs): jit_cls = cls._gen_type() - args = [] - for k, v in cls.items(): - args.append(kwargs[k]) args = (kwargs[k] for k, _ in cls.items()) return jit_cls(*args) diff --git a/tests/named_struct/test_numba.py b/tests/named_struct/test_numba.py index dda6ce8..d634ae4 100644 --- a/tests/named_struct/test_numba.py +++ b/tests/named_struct/test_numba.py @@ -1,12 +1,9 @@ -import numba from numba.types import float64 import numpy as np from privates import NamedStruct -FAIL_MSG = "Numba not found" - class Point(NamedStruct): x: float64 @@ -37,7 +34,7 @@ def test_create_api(): assert norm.y == 1 assert norm[1] == 1 assert norm.height == 5 - # assert norm[2] == 5 # TODO : need Struct.init + # assert norm[2] == 5 # TODO : needs Struct.init assert norm.width == 6 # assert norm[3] == 6 assert norm.distance_from_origin() == 1 diff --git a/tests/named_struct/test_numba_inheritance.py b/tests/named_struct/test_numba_inheritance.py deleted file mode 100644 index 8b13789..0000000 --- a/tests/named_struct/test_numba_inheritance.py +++ /dev/null @@ -1 +0,0 @@ -