Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions conformance/results/mypy/directives_type_ignore.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ Does not honor "# type: ignore" comment if comment includes additional text.
output = """
directives_type_ignore.py:11: error: Invalid "type: ignore" comment [syntax]
directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
directives_type_ignore.py:14: note: Error code "assignment" not covered by "type: ignore" comment
"""
conformance_automated = "Fail"
errors_diff = """
Line 11: Unexpected errors ['directives_type_ignore.py:11: error: Invalid "type: ignore" comment [syntax]', 'directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
Line 14: Unexpected errors ['directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
"""
6 changes: 3 additions & 3 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h3>Python Type System Conformance Test Results</h3>
</th>
<th class='tc-header'><div class='tc-name'>pyright 1.1.407</div>
</th>
<th class='tc-header'><div class='tc-name'>zuban 0.4.1</div>
<th class='tc-header'><div class='tc-name'>zuban 0.4.2</div>
</th>
<th class='tc-header'><div class='tc-name'>pyrefly 0.46.1</div>
</th>
Expand Down Expand Up @@ -353,7 +353,7 @@ <h3>Python Type System Conformance Test Results</h3>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_type_erasure</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Infers Node[Never] instead of Node[Any] when argument is not provided.</p><p>False negative on instance attribute access on type(node).</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Infers Node[Never] instead of Node[Any] when argument is not provided.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_typevartuple_args</th>
Expand Down Expand Up @@ -1031,7 +1031,7 @@ <h3>Python Type System Conformance Test Results</h3>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directives_type_ignore</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not honor "# type: ignore" comment if comment includes additional text.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not honor "# type: ignore" comment if comment includes additional text.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directives_type_ignore_file1</th>
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/zuban/classes_classvar.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ classes_classvar.py:40: error: Name "var" is not defined [name-defined]
classes_classvar.py:45: error: ClassVar cannot contain type variables [misc]
classes_classvar.py:46: error: ClassVar cannot contain type variables [misc]
classes_classvar.py:47: error: ClassVar cannot contain type variables [misc]
classes_classvar.py:52: error: Incompatible types in assignment (expression has type "dict[Never, Never]", variable has type "list[str]") [assignment]
classes_classvar.py:52: error: Incompatible types in assignment (expression has type "dict[Any, Any]", variable has type "list[str]") [assignment]
classes_classvar.py:54: error: Variable should not be annotated with both ClassVar and Final [misc]
classes_classvar.py:55: error: Invalid Type: ClassVar nested inside other type [misc]
classes_classvar.py:66: error: Type in ClassVar[...] can only be omitted if there is an initializer [misc]
Expand Down
6 changes: 3 additions & 3 deletions conformance/results/zuban/constructors_call_init.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ errors_diff = """
"""
output = """
constructors_call_init.py:21: error: Argument 1 to "Class1" has incompatible type "float"; expected "int" [arg-type]
constructors_call_init.py:42: error: Argument 1 to "Class3" has incompatible type "Class2[Never]"; expected "Self | None" [arg-type]
constructors_call_init.py:42: error: Argument 1 to "Class3" has incompatible type "Class2[Any]"; expected "Self | None" [arg-type]
constructors_call_init.py:56: error: Invalid self type in __init__ [call-arg]
constructors_call_init.py:107: error: The type of self "T1" has type vars in non standard potisions for class "Class8" [misc]
constructors_call_init.py:107: error: The type of self "T2" has type vars in non standard potisions for class "Class8" [misc]
constructors_call_init.py:107: error: The type of self "T1" has type vars in non standard positions for class "Class8" [misc]
constructors_call_init.py:107: error: The type of self "T2" has type vars in non standard positions for class "Class8" [misc]
constructors_call_init.py:130: error: Too many arguments for "Class11" [call-arg]
"""
11 changes: 1 addition & 10 deletions conformance/results/zuban/directives_type_ignore.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
conformant = "Partial"
notes = """
Does not honor "# type: ignore" comment if comment includes additional text.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 11: Unexpected errors ['directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
Line 14: Unexpected errors ['directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
"""
output = """
directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
directives_type_ignore.py:14: note: Error code "assignment" not covered by "type: ignore" comment
"""
10 changes: 1 addition & 9 deletions conformance/results/zuban/generics_type_erasure.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
conformant = "Partial"
notes = """
Infers Node[Never] instead of Node[Any] when argument is not provided.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 19: Unexpected errors ['generics_type_erasure.py:19: error: Expression is of type "Node[Never]", not "Node[Any]" [misc]']
Line 22: Unexpected errors ['generics_type_erasure.py:22: error: Expression is of type "Never", not "Any" [misc]']
"""
output = """
generics_type_erasure.py:19: error: Expression is of type "Node[Never]", not "Node[Any]" [misc]
generics_type_erasure.py:22: error: Expression is of type "Never", not "Any" [misc]
generics_type_erasure.py:38: error: Argument 1 to "Node" has incompatible type "str"; expected "int | None" [arg-type]
generics_type_erasure.py:40: error: Argument 1 to "Node" has incompatible type "int"; expected "str | None" [arg-type]
generics_type_erasure.py:42: error: Access to generic instance variables via class is ambiguous [misc]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ output = """
generics_typevartuple_specialization.py:109: error: Unpack is only valid in a variadic position [misc]
generics_typevartuple_specialization.py:109: error: TypeVarTuple "Ts" is unbound [misc]
generics_typevartuple_specialization.py:110: error: Unpack is only valid in a variadic position [misc]
generics_typevartuple_specialization.py:121: error: More than one Unpack in a type is not allowed [misc]
generics_typevartuple_specialization.py:122: error: More than one Unpack in a type is not allowed [misc]
generics_typevartuple_specialization.py:121: error: More than one variadic Unpack in a type is not allowed [misc]
generics_typevartuple_specialization.py:122: error: More than one variadic Unpack in a type is not allowed [misc]
generics_typevartuple_specialization.py:127: error: Bad number of arguments for type alias, expected at least 2, given 2 [misc]
generics_typevartuple_specialization.py:163: error: TypeVarTuple cannot be split [misc]
"""
10 changes: 5 additions & 5 deletions conformance/results/zuban/tuples_unpacked.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
tuples_unpacked.py:40: error: More than one Unpack in a type is not allowed [misc]
tuples_unpacked.py:41: error: More than one Unpack in a type is not allowed [misc]
tuples_unpacked.py:51: error: More than one Unpack in a type is not allowed [misc]
tuples_unpacked.py:59: error: More than one Unpack in a type is not allowed [misc]
tuples_unpacked.py:61: error: More than one Unpack in a type is not allowed [misc]
tuples_unpacked.py:40: error: More than one variadic Unpack in a type is not allowed [misc]
tuples_unpacked.py:41: error: More than one variadic Unpack in a type is not allowed [misc]
tuples_unpacked.py:51: error: More than one variadic Unpack in a type is not allowed [misc]
tuples_unpacked.py:59: error: More than one variadic Unpack in a type is not allowed [misc]
tuples_unpacked.py:61: error: More than one variadic Unpack in a type is not allowed [misc]
"""
2 changes: 1 addition & 1 deletion conformance/results/zuban/version.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "zuban 0.4.1"
version = "zuban 0.4.2"
2 changes: 1 addition & 1 deletion conformance/tests/directives_type_ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
y: int = "" # type: ignore - additional stuff

# The following type violation should be suppressed.
z: int = "" # type: ignore[additional_stuff]
z: int = "" # type: ignore[assignment]

# > In some cases, linting tools or other comments may be needed on the same
# > line as a type comment. In these cases, the type comment should be before
Expand Down