basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

infer property types treats the setter as an unchecked function

Open DetachHead opened this issue 3 years ago • 2 comments

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

Gist to reproduce

class A:
    @property
    def foo(self) -> int:
        ...

    @foo.setter
    def foo(self, value):
        reveal_type(value) # reveal_type' always outputs 'Any' in unchecked functions

Basedmypy version

1.4.0

Command-line flags

No response

Configuration options from pyproject.toml (and other config files)

[tool.mypy]
check_untyped_defs = false

Python version used

3.10

Operating system and version

windows 10

DetachHead avatar Jul 15 '22 03:07 DetachHead

What options do you have set? I'm not seeing this error.

KotlinIsland avatar Jul 16 '22 10:07 KotlinIsland

soz i assumed it was the defaults causing it

[tool.mypy]
check_untyped_defs = false

DetachHead avatar Jul 16 '22 12:07 DetachHead