Skip to content

Commit 6041a41

Browse files
display the available keys on error
1 parent 8875733 commit 6041a41

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

WDoc/WDoc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ def print_exception(exc_type, exc_value, exc_traceback):
194194
for k in cli_kwargs:
195195
if k not in self.allowed_extra_args:
196196
raise Exception(
197-
red(f"Found unexpected keyword argument: '{k}'"))
197+
red(f"Found unexpected keyword argument: '{k}'\nThe allowed arguments are {','.join(self.allowed_extra_args)}")
198+
)
198199

199200
# type checking of extra args
200201
if os.environ["WDOC_TYPECHECKING"] in ["crash", "warn"]:

0 commit comments

Comments
 (0)