KotlinIsland / KotlinIsland/basedmypy

`reveal_type` should show sub expressions

Open
#414 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```
👉 Mypy -c "reveal_type(bar(foo(1)))"
Input.py:1: note: Revealed type is:
bar(foo(1))
^ ^
| (int) -> str
(str) -> Bar[str]

Result: Bar[str]
Success
```

This would be useful for figuring out what generics and overloads have been resolved to.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the example with `mypy -c "reveal_type(bar(foo(1)))"` and inspect how `reveal_type` reports the expression. Done means the output shows the resolved types of the nested calls and the overall result, while the command still finishes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.