basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

treat `TYPE_CHECKING` blocks the same as stub files

Open KotlinIsland opened this issue 1 year ago • 2 comments

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    def f(a: int) -> int: ... # whinge whinge, a isn't used

KotlinIsland avatar Aug 26 '24 05:08 KotlinIsland

it should treat TYPE_CHECKING blocks the same as stub files

DetachHead avatar Aug 26 '24 05:08 DetachHead

upstream issues:

  • https://github.com/microsoft/pyright/issues/8619#issuecomment-2260735014
  • https://github.com/microsoft/pyright/issues/5819

DetachHead avatar Aug 26 '24 05:08 DetachHead