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"
400400
401401[builtins fixtures/bool.pyi]
402402
403- [case testAttrsNewPackage ]
404- import attrs
405- @attrs.define
403+ [case testAttrsOldPackage ]
404+ import attr
405+ @attr.s(auto_attribs=True)
406406class A:
407- a: int = attrs.field ()
407+ a: int = attr.ib ()
408408 b: bool
409409
410- @attrs. frozen
410+ @attr.s(auto_attribs=True, frozen=True)
411411class B:
412412 a: bool
413413 b: int
414414
415+ @attr.s
416+ class C:
417+ a = attr.ib(type=int)
418+
415419reveal_type(A) # N: Revealed type is "def (a: builtins.int, b: builtins.bool) -> __main__.A"
416420reveal_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"
417422
418423[builtins fixtures/bool.pyi]
419424
You can’t perform that action at this time.
0 commit comments