Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
  • Loading branch information
sklam and stuartarchibald authored Oct 19, 2021
commit 9f667547862157fa73f7e9f2fa4f4cfb46d8ed57
1 change: 0 additions & 1 deletion numba/core/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def __len__(self):
return len(self._stack)

@classmethod
# @contextmanager
def switch_target(cls, retarget: BaseRetarget):
"""Returns a contextmanager that pushes a new retarget handler,
an instance of `numba.core.retarget.BaseRetarget`, onto the
Expand Down
2 changes: 1 addition & 1 deletion numba/core/targetconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __len__(self):
return len(self._stk)

def enter(self, flags):
"""Returns contextmanager that perform ``push(flags)`` on enter and
"""Returns a contextmanager that performs ``push(flags)`` on enter and
``pop()`` on exit.
"""
return self._stk.enter(flags)
Expand Down
3 changes: 2 additions & 1 deletion numba/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ class ThreadLocalStack:
def __init_subclass__(cls, *, stack_name, **kwargs):
super().__init_subclass__(**kwargs)
# Register stack_name mapping to the new subclass
assert stack_name not in cls._registered, "stack_name already in use"
assert stack_name not in cls._registered, \
f"stack_name: '{stack_name}' already in use"
cls.stack_name = stack_name
cls._registered[stack_name] = cls

Expand Down