KotlinIsland / basedmypy

Based Python static type checker with baseline, sane default settings and based typing features
https://kotlinisland.github.io/basedmypy/
Other
146 stars 4 forks source link

`reveal_type` can be ignored when incorrectly matched from the baseline #191

Closed Zeckie closed 2 years ago

Zeckie commented 2 years ago

Describe the problem, ie expected/actual result (if it's not blatantly obvious)

I added reveal_type(some_variable) in my code, and ran basedmypy on the file.

Gist to reproduce

a: Any
print(a)

mypy --write-baseline .

a: Any
reveal_type(a)
print(a)

Basedmypy version

basedmypy 1.2.2 Based on mypy 0.940+dev (fa16759d)

KotlinIsland commented 2 years ago

Caused by #159, #192 and #124

The line that the reveal_type is on contains a misc baselined error, which is then matching both the reveal_type line and the next line.