Skip to content

[red-knot] Redudant-cast false positive for @Todo types #17164

@sharkdp

Description

@sharkdp

We have existing handling for filtering out @Todo types, but apparently it doesn't work in this case:

from typing import cast, Any

def f(a: Any):
    cast(dict[str, Any], a)  # Value is already of type `@Todo`

(https://playknot.ruff.rs/d1038da7-7198-4650-8288-548a94b74c77)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtyMulti-file analysis & type inference

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions