basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

new rule `reportUnusedType`

Open KotlinIsland opened this issue 1 year ago • 2 comments

very useful for type testing, and detecting dead/unused types in applications

def f[T: (int, str)](a: T): ... # error: T=str is unused  reportUnusedType

f(1)

it would have to determine the different branches of types

KotlinIsland avatar Aug 01 '24 03:08 KotlinIsland

depends on #539

DetachHead avatar Aug 01 '24 03:08 DetachHead

Doesn't necessarily depend on being an application. If you enable it with tests you can use it for type test coverage

KotlinIsland avatar Aug 01 '24 05:08 KotlinIsland