Skip to content

Commit b8bb5b6

Browse files
authored
Fix exception cause in regular_languages/validation.py
1 parent 5f2268d commit b8bb5b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prompt_toolkit/contrib/regular_languages/validation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def validate(self, document: Document) -> None:
5353
raise ValidationError(
5454
cursor_position=v.start + e.cursor_position,
5555
message=e.message,
56-
)
56+
) from e
5757
else:
5858
raise ValidationError(
5959
cursor_position=len(document.text), message="Invalid command"

0 commit comments

Comments
 (0)