Skip to content

Commit

Permalink
use assert for impossible condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Mar 8, 2024
1 parent 9e7f095 commit dd3f08e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_typer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1726,8 +1726,8 @@ def __exit__(self, exc_type, exc_val, exc_tb):
cmd_pth: t.List[str] = []
ctx = exc_val.ctx
while ctx and ctx.parent:
if ctx.info_name:
cmd_pth.insert(0, ctx.info_name)
assert ctx.info_name
cmd_pth.insert(0, ctx.info_name)
ctx = ctx.parent
if (
getattr(self, "_called_from_command_line", False)
Expand Down

0 comments on commit dd3f08e

Please sign in to comment.