Skip to content

[red-knot] Report invalid exceptions#15042

Merged
AlexWaygood merged 4 commits intoastral-sh:mainfrom
InSyncWithFoo:rk-exceptions
Dec 18, 2024
Merged

[red-knot] Report invalid exceptions#15042
AlexWaygood merged 4 commits intoastral-sh:mainfrom
InSyncWithFoo:rk-exceptions

Conversation

@InSyncWithFoo
Copy link
Copy Markdown
Contributor

Summary

Resolves #15038.

Test Plan

Markdown tests.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 18, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Copy Markdown
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Nice! This looks good to me.

I'd like to get @AlexWaygood review on it, since he's done most of the work on exceptions so far. Feel free to hold off on implementing my comments until he reviews also.

Comment thread crates/red_knot_python_semantic/resources/mdtest/exception/basic.md
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types.rs Outdated
@MichaReiser MichaReiser added the ty Multi-file analysis & type inference label Dec 18, 2024
Comment thread crates/red_knot_python_semantic/src/types.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/infer.rs
Comment thread crates/red_knot_python_semantic/src/types/infer.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/diagnostic.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types.rs Outdated
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

Comment thread crates/red_knot_python_semantic/src/types.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/infer.rs Outdated
Comment thread crates/red_knot_python_semantic/src/types/infer.rs Outdated
@AlexWaygood AlexWaygood enabled auto-merge (squash) December 18, 2024 18:27
@AlexWaygood AlexWaygood merged commit ed2bce6 into astral-sh:main Dec 18, 2024
@InSyncWithFoo InSyncWithFoo deleted the rk-exceptions branch December 18, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[red-knot] Add a diagnostic for raise statements used with non-exceptions

4 participants