Skip to content

Commit 4ee29f0

Browse files
rchen152facebook-github-bot
authored andcommitted
Pull in some test updates
Summary: Pulls in python/typing#2061. Reviewed By: ndmitchell Differential Revision: D79513775 fbshipit-source-id: 3261fa64f2df1be111576e380487f611e2925fb9
1 parent dded1ed commit 4ee29f0

6 files changed

Lines changed: 20 additions & 23 deletions

File tree

conformance/third_party/annotations_generators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ def generator7() -> Iterator[dict[str, int]]:
8484

8585

8686
def generator8() -> int: # E: incompatible return type
87-
yield None # E
87+
yield None # E?
8888
return 0
8989

9090

9191
async def generator9() -> int: # E: incompatible return type
92-
yield None # E
92+
yield None # E?
9393

9494

9595
class IntIterator(Protocol):

conformance/third_party/classes_override.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def method3(self) -> int: # E[method3]: no matching signature in ancestor
5454
return 1
5555

5656
@overload # E[method4]
57-
def method4(self, x: int) -> int:
57+
def method4(self, x: int) -> int: # E[method4]
5858
...
5959

6060
@overload

conformance/third_party/conformance.exp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3544,70 +3544,70 @@
35443544
"column": 13,
35453545
"concise_description": "`Literal[3]` is not assignable to attribute `name` with type `str`",
35463546
"description": "`Literal[3]` is not assignable to attribute `name` with type `str`",
3547-
"line": 57,
3547+
"line": 56,
35483548
"name": "bad-assignment",
35493549
"stop_column": 14,
3550-
"stop_line": 57
3550+
"stop_line": 56
35513551
},
35523552
{
35533553
"code": -2,
35543554
"column": 6,
35553555
"concise_description": "`<` is not supported between `Customer1` and `Customer1`",
35563556
"description": "`<` is not supported between `Customer1` and `Customer1`\n Cannot find `__lt__` or `__gt__`",
3557-
"line": 61,
3557+
"line": 60,
35583558
"name": "unsupported-operation",
35593559
"stop_column": 17,
3560-
"stop_line": 61
3560+
"stop_line": 60
35613561
},
35623562
{
35633563
"code": -2,
35643564
"column": 36,
35653565
"concise_description": "Unexpected keyword argument `salary` in function `Customer1.__init__`",
35663566
"description": "Unexpected keyword argument `salary` in function `Customer1.__init__`",
3567-
"line": 65,
3567+
"line": 64,
35683568
"name": "unexpected-keyword",
35693569
"stop_column": 42,
3570-
"stop_line": 65
3570+
"stop_line": 64
35713571
},
35723572
{
35733573
"code": -2,
35743574
"column": 18,
35753575
"concise_description": "Expected argument `id` to be passed by name in function `Customer2.__init__`",
35763576
"description": "Expected argument `id` to be passed by name in function `Customer2.__init__`",
3577-
"line": 71,
3577+
"line": 70,
35783578
"name": "unexpected-positional-argument",
35793579
"stop_column": 19,
3580-
"stop_line": 71
3580+
"stop_line": 70
35813581
},
35823582
{
35833583
"code": -2,
35843584
"column": 21,
35853585
"concise_description": "Expected argument `name` to be passed by name in function `Customer2.__init__`",
35863586
"description": "Expected argument `name` to be passed by name in function `Customer2.__init__`",
3587-
"line": 71,
3587+
"line": 70,
35883588
"name": "unexpected-positional-argument",
35893589
"stop_column": 27,
3590-
"stop_line": 71
3590+
"stop_line": 70
35913591
},
35923592
{
35933593
"code": -2,
35943594
"column": 7,
35953595
"concise_description": "Cannot inherit non-frozen dataclass `Customer3Subclass` from frozen dataclass `Customer3`",
35963596
"description": "Cannot inherit non-frozen dataclass `Customer3Subclass` from frozen dataclass `Customer3`",
3597-
"line": 90,
3597+
"line": 89,
35983598
"name": "invalid-inheritance",
35993599
"stop_column": 24,
3600-
"stop_line": 90
3600+
"stop_line": 89
36013601
},
36023602
{
36033603
"code": -2,
36043604
"column": 1,
36053605
"concise_description": "Cannot set field `id`",
36063606
"description": "Cannot set field `id`\n This field is a frozen dataclass member",
3607-
"line": 97,
3607+
"line": 96,
36083608
"name": "read-only",
36093609
"stop_column": 8,
3610-
"stop_line": 97
3610+
"stop_line": 96
36113611
}
36123612
],
36133613
"dataclasses_transform_meta.py": [

conformance/third_party/conformance.result

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@
8181
"Line 96: Unexpected errors ['assert_type(Any, int) failed']"
8282
],
8383
"annotations_generators.py": [
84-
"Line 87: Expected 1 errors",
85-
"Line 92: Expected 1 errors",
8684
"Line 190: Unexpected errors ['Expected to yield a value of type `int`, but a bare `yield` gives `None` instead']"
8785
],
8886
"annotations_methods.py": [],
@@ -99,7 +97,7 @@
9997
"callables_subtyping.py": [],
10098
"classes_classvar.py": [],
10199
"classes_override.py": [
102-
"Lines 56, 64, 65: Expected error (tag 'method4')"
100+
"Lines 56, 57, 64, 65: Expected error (tag 'method4')"
103101
],
104102
"constructors_call_init.py": [
105103
"Line 107: Expected 1 errors"

conformance/third_party/dataclasses_transform_func.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def create_model(cls: T) -> T:
1616

1717

1818
@overload
19-
@dataclass_transform(kw_only_default=True, order_default=True)
2019
def create_model(
2120
*,
2221
frozen: bool = False,

conformance/third_party/results.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"pass": 77,
44
"fail": 59,
55
"pass_rate": 0.57,
6-
"differences": 266,
6+
"differences": 264,
77
"passing": [
88
"aliases_explicit.py",
99
"aliases_newtype.py",
@@ -90,7 +90,7 @@
9090
"aliases_typealiastype.py": 26,
9191
"aliases_variance.py": 4,
9292
"annotations_forward_refs.py": 7,
93-
"annotations_generators.py": 3,
93+
"annotations_generators.py": 1,
9494
"callables_annotation.py": 2,
9595
"callables_kwargs.py": 2,
9696
"classes_override.py": 1,

0 commit comments

Comments
 (0)