File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -400,20 +400,25 @@ reveal_type(D) # N: Revealed type is "def (b: Any) -> __main__.D"
400
400
401
401
[builtins fixtures/bool.pyi]
402
402
403
- [case testAttrsNewPackage ]
404
- import attrs
405
- @attrs.define
403
+ [case testAttrsOldPackage ]
404
+ import attr
405
+ @attr.s(auto_attribs=True)
406
406
class A:
407
- a: int = attrs.field ()
407
+ a: int = attr.ib ()
408
408
b: bool
409
409
410
- @attrs. frozen
410
+ @attr.s(auto_attribs=True, frozen=True)
411
411
class B:
412
412
a: bool
413
413
b: int
414
414
415
+ @attr.s
416
+ class C:
417
+ a = attr.ib(type=int)
418
+
415
419
reveal_type(A) # N: Revealed type is "def (a: builtins.int, b: builtins.bool) -> __main__.A"
416
420
reveal_type(B) # N: Revealed type is "def (a: builtins.bool, b: builtins.int) -> __main__.B"
421
+ reveal_type(C) # N: Revealed type is "def (a: builtins.int) -> __main__.C"
417
422
418
423
[builtins fixtures/bool.pyi]
419
424
You can’t perform that action at this time.
0 commit comments