Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Fix flake8 and docs fails in public CI #222

Open
wants to merge 2 commits into
base: release0.54-patched
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions numba/core/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import uuid
import weakref
from contextlib import ExitStack
import abc

from numba import _dispatcher
from numba.core import (
Expand Down Expand Up @@ -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).
Expand Down
5 changes: 3 additions & 2 deletions numba/core/typing/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions numba/typed/typedlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down