From c697de54b8629b8ad94564d2652b1ef9846e23f4 Mon Sep 17 00:00:00 2001 From: Eugene <12152056+eufrizz@users.noreply.github.com> Date: Fri, 1 Dec 2023 08:16:56 +1100 Subject: [PATCH] Fix identity decorator for when Numba unavailable (#220) Co-authored-by: Mike Boyle --- pyproject.toml | 8 ++++---- src/quaternion/numba_wrapper.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dab19d3..f22ef7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,12 +7,12 @@ license = "MIT" authors = ["Michael Boyle "] homepage = "https://github.com/moble/quaternion" +[build-system] +requires = ["setuptools!=50.0", "wheel", "oldest-supported-numpy"] +build-backend = "setuptools.build_meta" + [tool.pytest.ini_options] minversion = "6.0" norecursedirs = ".* build dist *.egg-info install ENV" junit_family="xunit2" addopts = "-v --tb=short --doctest-glob='' --cov=quaternion --cov-branch --cov-report xml" - -[build-system] -requires = ["setuptools!=50.0", "wheel", "oldest-supported-numpy"] -build-backend = "setuptools.build_meta" diff --git a/src/quaternion/numba_wrapper.py b/src/quaternion/numba_wrapper.py index 805c652..4a8980d 100644 --- a/src/quaternion/numba_wrapper.py +++ b/src/quaternion/numba_wrapper.py @@ -21,9 +21,9 @@ # "may wish to install numba." + \ # "\n" + "!" * 53 + "\n" # warnings.warn(warning_text) - def _identity_decorator_outer(*args, **kwargs): - def _identity_decorator_inner(fn): - return fn + def _identity_decorator_outer(fn): + def _identity_decorator_inner(*args, **kwargs): + return fn(*args, **kwargs) return _identity_decorator_inner njit = _identity_decorator_outer jit = _identity_decorator_outer