facebook / facebook/pyrefly

typing forms (`_SpecialForm`/`UnionType`) are not `type`s

Open
#1,160 2 comments 0 reactions 0 assignees View on GitHub
typechecking
Dominant language
Rust
Stars
7k
Forks
519
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

```py
from typing import Never, Literal

a = int | str # expect UnionType, not type[int | str]

b: type[int | str] = int | str # expect error
c: type = Literal[1] # expect error
d: type = Never # expect error
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.