Skip to content

Improve error for invalid kwarg in Struct.__init__ - #273

Merged
jcrist merged 1 commit into
mainfrom
better-error-unexpected-kwarg
Jan 21, 2023
Merged

Improve error for invalid kwarg in Struct.__init__#273
jcrist merged 1 commit into
mainfrom
better-error-unexpected-kwarg

Conversation

@jcrist

@jcrist jcrist commented Jan 21, 2023

Copy link
Copy Markdown
Member

We now include the name of the first invalid keyword argument, which should make it easier to debug keyword arg typos.

This request came as feedback over email:

when providing an incorrect kwarg, it would be great if the error message could tell you which kwarg was incorrect, e.g. right now its just 'Extra keyword arguments provided'.

We now include the name of the first invalid keyword argument, which
should make it easier to debug keyword arg typos.
@jcrist
jcrist merged commit c712614 into main Jan 21, 2023
@jcrist
jcrist deleted the better-error-unexpected-kwarg branch January 21, 2023 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant