Skip to content

Commit dd3f08e

Browse files
committed
use assert for impossible condition
1 parent 9e7f095 commit dd3f08e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_typer/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,8 +1726,8 @@ def __exit__(self, exc_type, exc_val, exc_tb):
17261726
cmd_pth: t.List[str] = []
17271727
ctx = exc_val.ctx
17281728
while ctx and ctx.parent:
1729-
if ctx.info_name:
1730-
cmd_pth.insert(0, ctx.info_name)
1729+
assert ctx.info_name
1730+
cmd_pth.insert(0, ctx.info_name)
17311731
ctx = ctx.parent
17321732
if (
17331733
getattr(self, "_called_from_command_line", False)

0 commit comments

Comments
 (0)