diff --git a/README.rst b/README.rst index 047c0b0ee4c..8e6ca4efd3f 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ -***** +********************************* Numba with patches for numba-dppy -***** +********************************* .. image:: https://badges.gitter.im/numba/numba.svg :target: https://gitter.im/numba/numba?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge diff --git a/numba/core/dispatcher.py b/numba/core/dispatcher.py index 0b85700f520..5437a6f9ccb 100644 --- a/numba/core/dispatcher.py +++ b/numba/core/dispatcher.py @@ -8,6 +8,7 @@ import uuid import weakref from contextlib import ExitStack +import abc from numba import _dispatcher from numba.core import ( @@ -742,14 +743,13 @@ def _set_uuid(self, u): self._recent.append(self) -import abc - class DispatcherMeta(abc.ABCMeta): def __instancecheck__(self, other): return type(type(other)) == DispatcherMeta -class Dispatcher(serialize.ReduceMixin, _MemoMixin, _DispatcherBase, metaclass=DispatcherMeta): +class Dispatcher(serialize.ReduceMixin, _MemoMixin, _DispatcherBase, + metaclass=DispatcherMeta): """ Implementation of user-facing dispatcher objects (i.e. created using the @jit decorator). diff --git a/numba/core/typing/context.py b/numba/core/typing/context.py index c08db9c9e62..15fdbd1f0cc 100644 --- a/numba/core/typing/context.py +++ b/numba/core/typing/context.py @@ -237,11 +237,12 @@ def _resolve_user_function_type(self, func, args, kws, literals=None): from numba.core.registry import CPUDispatcher if isinstance(func, CPUDispatcher) and func is not CPUDispatcher: - # if we are here it's numba-dppy case and we got TargetDispatcher, so get compiled version + # if we are here it's numba-dppy case and we got TargetDispatcher, + # so get compiled version func = func.get_compiled() functy = self._lookup_global(func) if functy is not None: - func = functy + func = functy if isinstance(func, types.Type): # If it's a type, it may support a __call__ method diff --git a/numba/typed/typedlist.py b/numba/typed/typedlist.py index 3c380c66ab7..cc5d9f4d82e 100644 --- a/numba/typed/typedlist.py +++ b/numba/typed/typedlist.py @@ -347,7 +347,7 @@ def append(self, item: T) -> None: # noqa E704 required to follow overload style of using ... in the same line @pt.overload # type: ignore[override] def __setitem__(self, i: int, o: T) -> None: ... # noqa: F811, E704 - @pt.overload + @pt.overload # noqa: F811 def __setitem__(self, s: slice, o: 'List[T]') -> None: ... # noqa: F811, E704, E501 def __setitem__(self, i: Int_or_Slice, item: T_or_ListT) -> None: # noqa: F811, E501 @@ -359,7 +359,7 @@ def __setitem__(self, i: Int_or_Slice, item: T_or_ListT) -> None: # noqa: F811, # noqa E704 required to follow overload style of using ... in the same line @pt.overload def __getitem__(self, i: int) -> T: ... # noqa: F811, E704 - @pt.overload + @pt.overload # noqa: F811 def __getitem__(self, i: slice) -> 'List[T]': ... # noqa: F811, E704 def __getitem__(self, i: Int_or_Slice) -> T_or_ListT: # noqa: F811