Skip to content

Commit 945656b

Browse files
authored
Add the Zuban Type Checker (#2067)
1 parent 2f043ef commit 945656b

File tree

155 files changed

+2794
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+2794
-45
lines changed

conformance/results/mypy/overloads_definitions_stub.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Allows @override to appear in a stub file not on the first overload.
44
"""
55
conformance_automated = "Fail"
66
errors_diff = """
7-
Lines 143, 147, 149: Expected error (tag 'override_impl')
7+
Lines 143, 146, 147, 149: Expected error (tag 'override_impl')
88
"""
99
output = """
1010
overloads_definitions_stub.pyi:13: error: Single overload definition, multiple required [misc]

conformance/results/mypy/qualifiers_annotated.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ qualifiers_annotated.py:91: error: "<typing special form>" not callable [operat
2828
qualifiers_annotated.py:92: error: "<typing special form>" not callable [operator]
2929
qualifiers_annotated.py:98: error: Invalid type: ClassVar nested inside other type [valid-type]
3030
qualifiers_annotated.py:100: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]
31-
qualifiers_annotated.py:119: error: Cannot redefine "T" as a type variable [misc]
32-
qualifiers_annotated.py:119: error: Invalid assignment target [misc]
3331
"""
3432
conformance_automated = "Fail"
3533
errors_diff = """
@@ -38,5 +36,4 @@ Line 85: Expected 1 errors
3836
Line 93: Expected 1 errors
3937
Line 98: Unexpected errors ['qualifiers_annotated.py:98: error: Invalid type: ClassVar nested inside other type [valid-type]']
4038
Line 100: Unexpected errors ['qualifiers_annotated.py:100: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]']
41-
Line 119: Unexpected errors ['qualifiers_annotated.py:119: error: Cannot redefine "T" as a type variable [misc]', 'qualifiers_annotated.py:119: error: Invalid assignment target [misc]']
4239
"""

conformance/results/mypy/version.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.17.1"
2-
test_duration = 2.8
2+
test_duration = 2.96

conformance/results/pyre/classes_classvar.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ Line 70: Expected 1 errors
3333
Line 73: Expected 1 errors
3434
Line 77: Expected 1 errors
3535
Line 78: Expected 1 errors
36-
Line 66: Unexpected errors ['classes_classvar.py:66:4 Uninitialized attribute [13]: Attribute `good5` is declared in class `ClassA` to have type `typing.Any` but is never initialized.']
3736
Line 74: Unexpected errors ['classes_classvar.py:74:8 Incompatible return type [7]: Expected `CV[int]` but got `int`.']
3837
"""

conformance/results/pyre/overloads_definitions_stub.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Expects @final and @override to be present on all overloads, not just first.
44
"""
55
conformance_automated = "Fail"
66
errors_diff = """
7-
Lines 67, 69, 71, 73: Expected error (tag 'invalid_final')
8-
Lines 80, 82, 84, 86: Expected error (tag 'invalid_final_2')
7+
Lines 67, 69, 71, 72, 73: Expected error (tag 'invalid_final')
8+
Lines 80, 82, 84, 85, 86: Expected error (tag 'invalid_final_2')
99
Lines 102, 107, 108, 111, 113: Expected error (tag 'override-final')
1010
Line 63: Unexpected errors ['overloads_definitions_stub.pyi:63:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
1111
Line 76: Unexpected errors ['overloads_definitions_stub.pyi:76:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']

conformance/results/pyre/typeddicts_alt_syntax.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ errors_diff = """
1313
Line 27: Expected 1 errors
1414
Line 31: Expected 1 errors
1515
Line 35: Expected 1 errors
16-
Line 45: Expected 1 errors
1716
Line 43: Unexpected errors ['typeddicts_alt_syntax.py:43:8 Undefined or invalid type [11]: Annotation `Movie2` is not defined as a type.']
1817
"""

conformance/results/pyre/version.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyre 0.9.25"
2-
test_duration = 5.4
2+
test_duration = 5.93
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyright 1.1.403"
2-
test_duration = 4.3
2+
test_duration = 3.15

conformance/results/results.html

Lines changed: 163 additions & 23 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
conformance_automated = "Pass"
2+
errors_diff = """
3+
"""
4+
output = """
5+
aliases_explicit.py:67: error: Bad number of arguments for type alias, expected 0, given 1
6+
aliases_explicit.py:68: error: Bad number of arguments for type alias, expected 0, given 1
7+
aliases_explicit.py:69: error: Bad number of arguments for type alias, expected 1, given 2
8+
aliases_explicit.py:70: error: Bad number of arguments for type alias, expected 1, given 2
9+
aliases_explicit.py:71: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int"
10+
aliases_explicit.py:79: error: Invalid type alias: expression is not a valid type
11+
aliases_explicit.py:80: error: Bracketed expression "[...]" is not valid as a type
12+
aliases_explicit.py:80: note: Did you mean "List[...]"?
13+
aliases_explicit.py:81: error: Syntax error in type annotation
14+
aliases_explicit.py:81: note: Suggestion: Is there a spurious trailing comma?
15+
aliases_explicit.py:82: error: Invalid type alias: expression is not a valid type
16+
aliases_explicit.py:83: error: Invalid type alias: expression is not a valid type
17+
aliases_explicit.py:84: error: Invalid type alias: expression is not a valid type
18+
aliases_explicit.py:85: error: Invalid type alias: expression is not a valid type
19+
aliases_explicit.py:86: error: Invalid type alias: expression is not a valid type
20+
aliases_explicit.py:87: error: Variable "aliases_explicit.var1" is not valid as a type
21+
aliases_explicit.py:87: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
22+
aliases_explicit.py:88: error: Invalid type alias: expression is not a valid type
23+
aliases_explicit.py:89: error: Invalid type: try using Literal[1] instead?
24+
aliases_explicit.py:90: error: Invalid type alias: expression is not a valid type
25+
aliases_explicit.py:91: error: Invalid type alias: expression is not a valid type
26+
aliases_explicit.py:100: error: Bad number of arguments for type alias, expected 0, given 1
27+
aliases_explicit.py:101: error: "<typing special form>" not callable
28+
aliases_explicit.py:102: error: Bad number of arguments for type alias, expected 0, given 1
29+
"""

0 commit comments

Comments
 (0)