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 file watcher panic when event has no paths #14364

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Nov 15, 2024

Summary

Fixes #14222

I don't know how to test this. There's also no documentation saying whether this is expected for any event other than a rescan, which is explicitly handled above.

Either way, we should not panic, so let's remove the unwrap.

Test Plan

cargo test

@MichaReiser MichaReiser added the red-knot Multi-file analysis & type inference label Nov 15, 2024
@MichaReiser MichaReiser force-pushed the micha/fix-watcher-panic-no-paths branch from 2685278 to 3de1586 Compare November 15, 2024 17:03
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser merged commit a6a3d3f into main Nov 16, 2024
20 checks passed
@MichaReiser MichaReiser deleted the micha/fix-watcher-panic-no-paths branch November 16, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[red-knot] Spurious panic in file watcher test
2 participants