facebook / facebook/pyrefly

enh: show more info in `reveal_type`

Open
#3,781 3 comments 0 reactions 0 assignees View on GitHub
configuration help wanted needs-discussion quansight
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

```py
import pandas as pd
import numpy as np
from typing import reveal_type

def main(s: pd.Series[pd.Timedelta]) -> None:
td = np.timedelta64(1, "D")
reveal_type(td)
```

```console
(.venv) mgorelli@marcoslaptop:~/pandas-stubs-dev$ mypy t.py
t.py:7: note: Revealed type is "numpy.timedelta64[datetime.timedelta]"
Success: no issues found in 1 source file
(.venv) mgorelli@marcoslaptop:~/pandas-stubs-dev$ pyrefly check t.py
INFO revealed type: timedelta64[timedelta] [reveal-type]
--> t.py:7:16
|
7 | reveal_type(td)
| ----
|
INFO 0 errors
```

I think the mypy output is easier to use for debugging here?

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.