Skip to content

Update star.md tests to avoid syntax errors #120

@ntBre

Description

@ntBre

A few match tests in star.md have cases like this:

match 42:
    case P | Q:  # error: [invalid-syntax] "name capture `P` makes remaining patterns unreachable"
        ...

where the first catch-all makes the second unreachable. @AlexWaygood and I discussed a couple of approaches in this thread, but the best approach that preserved the meaning of the test wasn't immediately clear. We also stumbled upon a new syntax error that I'll add to astral-sh/ruff#17412.

Metadata

Metadata

Assignees

Labels

importsModule resolution, site-packages discovery, import-related diagnosticsinternalAn internal refactor or improvementtestingRelated to testing ty itself

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions