Skip to content

Commit 72de8c2

Browse files
committed
chore: tighten up the message code
1 parent f264ec9 commit 72de8c2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

numba_cuda/numba/cuda/core/untyped_passes.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,9 @@ def fallback_context(state, msg):
6565
# this emits a warning containing the error message body in the
6666
# case of fallback from npm to objmode
6767
loop_lift = "" if state.flags.enable_looplift else "OUT"
68-
msg_rewrite = (
69-
"\nCompilation is falling back to object mode "
70-
"WITH%s looplifting enabled because %s" % (loop_lift, msg)
71-
)
7268
warnings.warn_explicit(
73-
"%s due to: %s" % (msg_rewrite, e),
69+
"Compilation is falling back to object mode "
70+
f"WITH{loop_lift} looplifting enabled because {msg} due to: {e}",
7471
errors.NumbaWarning,
7572
state.func_id.filename,
7673
state.func_id.firstlineno,

0 commit comments

Comments
 (0)