Skip to content

None gets dropped in ternary statement with lists #2258

Closed
@ddfisher

Description

@ddfisher

python3 -m mypy --strict-optional -c 'reveal_type([None] if bool() else [1])' <string>:1: error: Revealed type is 'builtins.list[builtins.int]'

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions