Skip to content

Commit 585bc15

Browse files
committed
Add set testcase
1 parent e083e5c commit 585bc15

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test-data/unit/check-slots.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,14 @@ class A:
512512

513513
reveal_type(A.__slots__) # N: Revealed type is "builtins.list[builtins.str]"
514514

515+
[case testSlotsEmptySet]
516+
class A:
517+
__slots__ = set()
518+
reveal_type(__slots__) # N: Revealed type is "builtins.set[builtins.str]"
519+
520+
reveal_type(A.__slots__) # N: Revealed type is "builtins.set[builtins.str]"
521+
[builtins fixtures/set.pyi]
522+
515523
[case testSlotsWithAny]
516524
from typing import Any
517525

0 commit comments

Comments
 (0)