-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
astral-sh/ruff
#22939Labels
runtime semanticsAccurate modeling of how Python's semantics work at runtimeAccurate modeling of how Python's semantics work at runtime
Milestone
Description
Summary
This may be a duplicate of #887 but I didn't see this specific case mentioned, so I'm throwing it out here. Feel free to close if another issue isn't necessary.
Observed behavior
The following code passes ty but throws a TypeError at runtime:
foo = "foo"
match "bar":
case foo():
...Expected behavior
ty should raise an error when a non-type is used in a class pattern when matching. Both mypy and pyright catch this.
Version
0.0.10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
runtime semanticsAccurate modeling of how Python's semantics work at runtimeAccurate modeling of how Python's semantics work at runtime