Skip to content

[red-knot] support narrowing on if x and if not x #14550

@carljm

Description

@carljm

This is trickier than it might appear; the complexities are discussed in #13694 (comment)

It will likely require adding a new method Type::exclude_always_truthy which returns a new Type that excludes all inhabitants of the previous type that are known to always be truthy.

Metadata

Metadata

Assignees

Labels

tyMulti-file analysis & type inference

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions