Skip to content

Commit e5d8da0

Browse files
committed
replace testAttrsNewPackage with testAttrsOldPackage
1 parent 64b3d1a commit e5d8da0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test-data/unit/check-plugin-attrs.test

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff 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)
406406
class 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)
411411
class B:
412412
a: bool
413413
b: int
414414

415+
@attr.s
416+
class C:
417+
a = attr.ib(type=int)
418+
415419
reveal_type(A) # N: Revealed type is "def (a: builtins.int, b: builtins.bool) -> __main__.A"
416420
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"
417422

418423
[builtins fixtures/bool.pyi]
419424

0 commit comments

Comments
 (0)