Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update validation error to allow string or none #763

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

frodehk
Copy link
Contributor

@frodehk frodehk commented Jan 14, 2025

Why is this pull request needed?

Update validation error to allow string or None. Avoid TypeScript errors when trying to assign to assign string | null to location.

@frodehk frodehk requested a review from a team as a code owner January 14, 2025 15:27
@@ -141,7 +152,7 @@ def __init__(
dump_flow_style: Optional[DumpFlowStyle] = None,
):
super().__init__(message)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
super().__init__(message)
super().__init__(message=message)

Copy link
Contributor Author

@frodehk frodehk Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that the Exception class does not accept keyword arguments. Hence message must be passed directly in super().__init__()

Copy link
Collaborator

@TeeeJay TeeeJay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see suggested changes

@frodehk frodehk merged commit a5b491d into main Jan 15, 2025
8 checks passed
@frodehk frodehk deleted the update-validation-error branch January 15, 2025 09:39
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.

2 participants