basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

Variables of type Unknown | Any are highlighted as types

Open AThePeanut4 opened this issue 3 months ago • 4 comments

Description

from typing import Any

test: Any = s
not_a_type = test
Image

Related #1521 and #1554, probably

AThePeanut4 avatar Nov 17 '25 11:11 AThePeanut4

Also seeing the same issue when setting untyped properties

class A:
    def __init__(self):
        self._prop = "yes"

    @property
    def prop(self):
        return self._prop

    @prop.setter
    def prop(self, value):
        self._prop = value

a = A()
s = a.prop
a.prop = "hi"
Image

AThePeanut4 avatar Nov 17 '25 11:11 AThePeanut4

fyi @KurtBoehm

DetachHead avatar Nov 19 '25 13:11 DetachHead

Probably should have mentioned I was using basedpyright 1.33.0, still seeing both issues on 1.34.0

AThePeanut4 avatar Nov 19 '25 22:11 AThePeanut4

All good, I verified it still happens on the latest commit

DetachHead avatar Nov 20 '25 00:11 DetachHead