You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using the numba.njit decorator to decorate a function. When I execute the typeguard nox session I get an error when this decorated function is called:
In order to narrow down the error I realized that this error is only raised when I import the function via from my_module.numba_typeguard import numba_sum. When I import that exactly same function via from .numba_typeguard import numba_sum_local the error is not there. Here are the three files I am using:
Only the test function test_numba_sum_njit fails with the above error. Is there any way to avoid that error? Somehow it is related to the fact that the one function is imported via an absolute import while the other one is imported relatively.
Is there a way to disbale / ignore errors in typeguard with a comment as is possible for mypy / flake8?
Hi,
I am using the
numba.njit
decorator to decorate a function. When I execute thetypeguard
nox session I get an error when this decorated function is called:In order to narrow down the error I realized that this error is only raised when I import the function via
from my_module.numba_typeguard import numba_sum
. When I import that exactly same function viafrom .numba_typeguard import numba_sum_local
the error is not there. Here are the three files I am using:src/my_module/numba_typeguard.py
tests/numba_typeguard.py same function as above but in
tests
directory.tests/test_numba_typeguard.py
Only the test function
test_numba_sum_njit
fails with the above error. Is there any way to avoid that error? Somehow it is related to the fact that the one function is imported via an absolute import while the other one is imported relatively.Is there a way to disbale / ignore errors in typeguard with a comment as is possible for mypy / flake8?
I raised also an issue in the typeguard repo: agronholm/typeguard#277
The text was updated successfully, but these errors were encountered: