Skip to content

Commit

Permalink
work around mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
froystig authored and NeilGirdhar committed Jun 11, 2020
1 parent a044bb3 commit 3f38570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jax/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,10 +1129,10 @@ def check_jaxpr(jaxpr: Jaxpr):
exception_type = type(e)
msg_context = f"while checking jaxpr:\n\n{jaxpr}\n"
if len(e.args) == 0:
exception_args = (msg_context,)
exception_args = [msg_context]
else:
msg = f"{e.args[0]}\n\n" + msg_context
exception_args = (msg, *e.args[1:])
exception_args = [msg, *e.args[1:]]
raise exception_type(*exception_args) from e

def _check_jaxpr(jaxpr: Jaxpr):
Expand Down

0 comments on commit 3f38570

Please sign in to comment.