Skip to content

Type ignore comments with ty-namespaced codes are not recognized as blanket type ignores #11345

@correctmost

Description

@correctmost

Describe the bug

ty 0.0.25 added support for type ignore comments that use namespaced codes and look like this: type: ignore[ty:unresolved-reference] (astral-sh/ruff#24096).

When these namespaced codes are used, Pyright fails to treat the comment as a blanket type ignore.

Code or Screenshots

a[1]  # type: ignore[name-defined, ty:unresolved-reference]
error: "a" is not defined (reportUndefinedVariable)

VS Code extension or command-line
1.1.408 (command-line version)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions