Closed
Description
Can a class decorator "change" the type of the decorated class?
My issue is with a "wrapper" class that I created, but I can replicate with even this example:
@str
class C: ...
reveal_type(C)
if I launch mypy I see
$ mypy <(echo '@str
> class C: ...
> reveal_type(C)')
/dev/fd/63:3: note: Revealed type is 'def () -> __main__.C'
$
while C, actually, has became a str
!
Metadata
Metadata
Assignees
Labels
No labels