Skip to content

Avoid type inference diagnostics on nodes with invalid syntax #119

@ntBre

Description

@ntBre

hmm, yeah, ideally we would get rid of the invalid-type-form error here; it's just redundant noise to the user to have two diagnostics for the same problem. I think @MichaReiser has mentioned in the past that he wanted a global solution to make sure we didn't emit any red-knot diagnostics from type inference on nodes that were already known to be invalid syntax. Would be another thing that would be good to file a followup issue for IMO.

Originally posted by @AlexWaygood in astral-sh/ruff#17463 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    diagnosticsRelated to reporting of diagnostics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions