Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: KeyWatcher.updates() returns type of Entry | None #500

Merged
merged 1 commit into from
Sep 20, 2023
Merged

fix: KeyWatcher.updates() returns type of Entry | None #500

merged 1 commit into from
Sep 20, 2023

Conversation

tekumara
Copy link
Contributor

vscode/pyright infers the type of KeyWatcher.updates() as Unknown:

CleanShot 2023-09-20 at 21 10 01@2x

with this fix the type is now inferred as Entry | None:

CleanShot 2023-09-20 at 21 11 08@2x

in this example e could be None, so the type checker is now correctly telling us we haven't checked the None case (hence the red squiggly lines)

@wallyqs wallyqs merged commit 3548f82 into nats-io:main Sep 20, 2023
@wallyqs
Copy link
Member

wallyqs commented Sep 20, 2023

Thanks for the fix!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants