Skip to content

Commit

Permalink
Revert to assert, otherwise mypy complains about unreachable statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec committed Nov 4, 2024
1 parent 9e65150 commit 5305637
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pytket/phir/phirgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,7 @@ def phir_from_clexpr_arg(
):
logging.exception("Register variable not aligned with any register")
return reg_name
if not isinstance(expr_arg, ClExpr):
msg = f"Invalid expression argument: {expr_arg}"
raise TypeError(msg)
assert isinstance(expr_arg, ClExpr) # noqa: S101

cop = get_cop_from_op(expr_arg.op)
if isinstance(cop, int):
Expand Down

0 comments on commit 5305637

Please sign in to comment.