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

Fix rich prompt type checking errors #270

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

pederhan
Copy link
Member

@pederhan pederhan commented Dec 9, 2024

Rich prompts have inflexible overloads + type annotations, which means we need to pass in ... to signify that the prompt should have no default value. However, that requires using Any as the annotation for our own default parameters, which in turn destroys type checking of prompt default values. This PR adds pyright: ignore comments wherever ... defaults are used, so that we can maintain the correct type annotations but still use the "correct" default value to signify "no default".

@pederhan pederhan merged commit 84b0746 into unioslo:master Dec 9, 2024
5 checks passed
@pederhan pederhan deleted the fix-type-checking-errors branch December 9, 2024 13:08
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