Skip to content

Commit 8ec90d6

Browse files
committed
Fixes tests
1 parent c2c55d6 commit 8ec90d6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

typesafety/test_supports_type/test_regular.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
def convert_to_json(instance: Supports[Other]) -> str:
122122
return to_json(instance)
123123
out: |
124-
main:14: error: Argument 1 to "to_json" has incompatible type "Supports[Other]"; expected "Union[<nothing>, Supports[ToJson]]"
124+
main:14: error: Argument 1 to "to_json" has incompatible type "Supports[Other]"; expected "Supports[ToJson]"
125125
126126
127127
- case: supports_annotation

typesafety/test_typeclass/test_supports/test_typeguard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
reveal_type(item)
5252
to_json(item) # ok
5353
out: |
54-
main:20: error: Argument 1 to "to_json" has incompatible type "Union[int, str]"; expected "Union[int, Dict[Any, Any], Supports[ToJson]]"
55-
main:23: note: Revealed type is "Union[builtins.int, builtins.dict[Any, Any]]"
54+
main:20: error: Argument 1 to "to_json" has incompatible type "Union[int, str]"; expected "Union[Dict[Any, Any], Supports[ToJson]]"
55+
main:23: note: Revealed type is "Union[builtins.dict[Any, Any], builtins.int]"
5656
5757
5858
- case: typeclass_function_supports_typeguard_generic1
@@ -116,5 +116,5 @@
116116
reveal_type(item)
117117
copy(item) # ok
118118
out: |
119-
main:22: error: Argument 1 to "copy" has incompatible type "Union[builtins.int, builtins.str]"; expected "Union[builtins.dict[Any, Any], builtins.int, classes._typeclass.Supports[main.Copy]]"
119+
main:22: error: Argument 1 to "copy" has incompatible type "Union[builtins.int, builtins.str]"; expected "Union[builtins.dict[Any, Any], classes._typeclass.Supports[main.Copy]]"
120120
main:25: note: Revealed type is "Union[builtins.dict[Any, Any], builtins.int]"

typesafety/test_typeclass/test_typeclass.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
to_json('a')
3333
to_json(None)
3434
out: |
35-
main:20: error: Argument 1 to "to_json" has incompatible type "None"; expected "Union[str, int, Supports[ToJson]]"
35+
main:20: error: Argument 1 to "to_json" has incompatible type "None"; expected "Supports[ToJson]"
3636
3737
3838
- case: typeclass_class_wrong_sig

0 commit comments

Comments
 (0)