Skip to content
Merged
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/annotations_forward_refs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ annotations_forward_refs.py:96: error: Expression is of type int?, not "int" [a
"""
conformance_automated = "Fail"
errors_diff = """
Line 22: Expected 1 errors
Line 23: Expected 1 errors
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 66: Expected 1 errors
Line 87: Unexpected errors ['annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]']
Line 96: Unexpected errors ['annotations_forward_refs.py:96: error: Expression is of type int?, not "int" [assert-type]']
"""
3 changes: 0 additions & 3 deletions conformance/results/pyre/annotations_forward_refs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ annotations_forward_refs.py:103:7 Undefined or invalid type [11]: Annotation `
"""
conformance_automated = "Fail"
errors_diff = """
Line 22: Expected 1 errors
Line 23: Expected 1 errors
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 54: Expected 1 errors
Line 66: Expected 1 errors
Line 89: Expected 1 errors
Line 87: Unexpected errors ['annotations_forward_refs.py:87:7 Undefined or invalid type [11]: Annotation `ClassD.int` is not defined as a type.']
Line 96: Unexpected errors ['annotations_forward_refs.py:96:0 Assert type [70]: Expected `int` but got `unknown`.']
Expand Down
3 changes: 0 additions & 3 deletions conformance/results/pyrefly/annotations_forward_refs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ Does not reject some type forms that require quotes.
"""
conformance_automated = "Fail"
errors_diff = """
Line 22: Expected 1 errors
Line 23: Expected 1 errors
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 66: Expected 1 errors
Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]']
Line 96: Unexpected errors ['assert_type(Any, int) failed [assert-type]']
"""
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h3>Python Type System Conformance Test Results</h3>
</th>
<th class='tc-header'><div class='tc-name'>pyre 0.9.25</div>
</th>
<th class='tc-header'><div class='tc-name'>zuban 0.0.24</div>
<th class='tc-header'><div class='tc-name'>zuban 0.1.0</div>
</th>
<th class='tc-header'><div class='tc-name'>pyrefly 0.36.2</div>
</th>
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/zuban/aliases_newtype.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ errors_diff = """
output = """
aliases_newtype.py:11: error: Argument 1 to "UserId" has incompatible type "str"; expected "int" [arg-type]
aliases_newtype.py:12: error: Incompatible types in assignment (expression has type "int", variable has type "UserId") [assignment]
aliases_newtype.py:18: error: Incompatible types in assignment (expression has type "Type[UserId]", variable has type "Type[Any]") [assignment]
aliases_newtype.py:18: error: Incompatible types in assignment (expression has type "type[UserId]", variable has type "type[Any]") [assignment]
aliases_newtype.py:23: error: Cannot use isinstance() with NewType type [misc]
aliases_newtype.py:26: error: Cannot subclass "NewType" [misc]
aliases_newtype.py:35: error: String argument 1 "BadName" to NewType(...) does not match variable name "GoodName" [misc]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/zuban/aliases_type_statement.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases_type_statement.py:17: error: "TypeAliasType" has no attribute "bit_count
aliases_type_statement.py:19: error: "TypeAliasType" not callable [operator]
aliases_type_statement.py:23: error: "TypeAliasType" has no attribute "other_attrib" [attr-defined]
aliases_type_statement.py:26: error: Type alias defined using "type" statement not valid as base class [misc]
aliases_type_statement.py:31: error: Argument 2 to "isinstance" has incompatible type "TypeAliasType"; expected "Type[Any] | UnionType | tuple[_ClassInfo, ...]" [arg-type]
aliases_type_statement.py:31: error: Argument 2 to "isinstance" has incompatible type "TypeAliasType"; expected "type[Any] | UnionType | tuple[_ClassInfo, ...]" [arg-type]
aliases_type_statement.py:37: error: Invalid type alias: expression is not a valid type [valid-type]
aliases_type_statement.py:38: error: Bracketed expression "[...]" is not valid as a type [valid-type]
aliases_type_statement.py:38: note: Did you mean "List[...]"?
Expand Down
13 changes: 5 additions & 8 deletions conformance/results/zuban/annotations_forward_refs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ Does not ignore newlines in multi-line unions
"""
conformance_automated = "Fail"
errors_diff = """
Line 22: Expected 1 errors
Line 23: Expected 1 errors
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 66: Expected 1 errors
Line 82: Unexpected errors ['annotations_forward_refs.py:82: error: Name "str" is not defined [name-defined]']
Line 87: Unexpected errors ['annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]']
Line 95: Unexpected errors ['annotations_forward_refs.py:95: error: Expression is of type "Any", not "str" [misc]']
Line 96: Unexpected errors ['annotations_forward_refs.py:96: error: Expression is of type "Any", not "int" [misc]']
Line 104: Unexpected errors ['annotations_forward_refs.py:104: error: invalid syntax [syntax]']
Line 105: Unexpected errors ['annotations_forward_refs.py:105: error: invalid syntax [syntax]', 'annotations_forward_refs.py:105: error: invalid syntax [syntax]']
Line 104: Unexpected errors ['annotations_forward_refs.py:104: error: Invalid syntax [syntax]']
Line 105: Unexpected errors ['annotations_forward_refs.py:105: error: Invalid syntax [syntax]', 'annotations_forward_refs.py:105: error: Invalid syntax [syntax]']
"""
output = """
annotations_forward_refs.py:41: error: Invalid type comment or annotation [valid-type]
Expand Down Expand Up @@ -46,7 +43,7 @@ annotations_forward_refs.py:89: error: Function "annotations_forward_refs.ClassD
annotations_forward_refs.py:89: note: Perhaps you need "Callable[...]" or a callback protocol?
annotations_forward_refs.py:95: error: Expression is of type "Any", not "str" [misc]
annotations_forward_refs.py:96: error: Expression is of type "Any", not "int" [misc]
annotations_forward_refs.py:104: error: invalid syntax [syntax]
annotations_forward_refs.py:105: error: invalid syntax [syntax]
annotations_forward_refs.py:105: error: invalid syntax [syntax]
annotations_forward_refs.py:104: error: Invalid syntax [syntax]
annotations_forward_refs.py:105: error: Invalid syntax [syntax]
annotations_forward_refs.py:105: error: Invalid syntax [syntax]
"""
2 changes: 1 addition & 1 deletion conformance/results/zuban/annotations_generators.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
annotations_generators.py:51: error: Missing return statement [return]
annotations_generators.py:51: error: Incompatible return value type (implicitly returns "None", expected "C") [return-value]
annotations_generators.py:54: error: Incompatible return value type (got "bool", expected "C") [return-value]
annotations_generators.py:57: error: Incompatible types in "yield" (actual type "int", expected type "A") [misc]
annotations_generators.py:66: error: Incompatible types in "yield" (actual type "int", expected type "A") [misc]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/zuban/dataclasses_match_args.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
dataclasses_match_args.py:42: error: "Type[DC4]" has no attribute "__match_args__" [attr-defined]
dataclasses_match_args.py:42: error: "type[DC4]" has no attribute "__match_args__" [attr-defined]
"""
2 changes: 1 addition & 1 deletion conformance/results/zuban/dataclasses_slots.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Line 25: Expected 1 errors
output = """
dataclasses_slots.py:11: error: "DC1" both defines "__slots__" and is used with "slots=True" [misc]
dataclasses_slots.py:38: error: Trying to assign name "y" that is not in "__slots__" of type "dataclasses_slots.DC3" [misc]
dataclasses_slots.py:66: error: "Type[DC6]" has no attribute "__slots__" [attr-defined]
dataclasses_slots.py:66: error: "type[DC6]" has no attribute "__slots__" [attr-defined]
dataclasses_slots.py:69: error: "DC6" has no attribute "__slots__" [attr-defined]
"""
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ dataclasses_transform_converter.py:109: error: Argument 5 to "DC2" has incompati
dataclasses_transform_converter.py:118: error: Incompatible types in assignment of a dataclass converter (expression has type "int", expected type "str") [assignment]
dataclasses_transform_converter.py:119: error: Incompatible types in assignment of a dataclass converter (expression has type "int", expected type "str | bytes") [assignment]
dataclasses_transform_converter.py:130: error: Argument "default" to "model_field" has incompatible type "int"; expected "str | None" [arg-type]
dataclasses_transform_converter.py:133: error: Argument "default_factory" to "model_field" has incompatible type "Type[int]"; expected "Callable[[], str] | None" [arg-type]
dataclasses_transform_converter.py:133: error: Argument "default_factory" to "model_field" has incompatible type "type[int]"; expected "Callable[[], str] | None" [arg-type]
"""
2 changes: 1 addition & 1 deletion conformance/results/zuban/dataclasses_usage.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dataclasses_usage.py:61: error: Attributes without a default cannot follow attri
dataclasses_usage.py:67: error: Attributes without a default cannot follow attributes with one [misc]
dataclasses_usage.py:73: error: Attributes without a default cannot follow attributes with one [misc]
dataclasses_usage.py:83: error: Too many arguments for "DC4" [call-arg]
dataclasses_usage.py:88: error: Argument "default_factory" to "field" has incompatible type "Type[str]"; expected "Callable[[], int]" [arg-type]
dataclasses_usage.py:88: error: Argument "default_factory" to "field" has incompatible type "type[str]"; expected "Callable[[], int]" [arg-type]
dataclasses_usage.py:127: error: Too many arguments for "DC7" [call-arg]
dataclasses_usage.py:130: error: Missing positional argument "y" in call to "DC8" [call-arg]
dataclasses_usage.py:179: error: Too many arguments for "DC13" [call-arg]
Expand Down
1 change: 0 additions & 1 deletion conformance/results/zuban/enums_expansion.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ Line 53: Expected 1 errors
Line 52: Unexpected errors ['enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [misc]']
"""
output = """
enums_expansion.py:35: error: Expression is of type "Color", not "Never" [misc]
enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [misc]
"""
4 changes: 2 additions & 2 deletions conformance/results/zuban/generics_base_class.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Does not detect inconsistent type variable ordering in multi-inheritance.
conformance_automated = "Fail"
errors_diff = """
Line 98: Expected 1 errors
Line 38: Unexpected errors ['generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "Type[Iterable]" [misc]']
Line 38: Unexpected errors ['generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "type[Iterable]" [misc]']
"""
output = """
generics_base_class.py:26: error: Argument 1 to "takes_dict_incorrect" has incompatible type "SymbolTable"; expected "dict[str, list[object]]" [arg-type]
generics_base_class.py:29: error: Invalid type [valid-type]
generics_base_class.py:30: error: Invalid type [valid-type]
generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "Type[Iterable]" [misc]
generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "type[Iterable]" [misc]
generics_base_class.py:49: error: "LinkedList" expects 1 type argument, but 2 given [type-arg]
generics_base_class.py:61: error: "MyDict" expects 1 type argument, but 2 given [type-arg]
generics_base_class.py:68: error: Duplicate type variables in Generic[...] or Protocol[...] [misc]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/zuban/generics_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ generics_basic.py:162: error: Free type variable expected in Generic[...] [misc
generics_basic.py:163: error: Free type variable expected in Protocol[...] [misc]
generics_basic.py:171: error: If Generic[...] or Protocol[...] is present it should list all type variables [misc]
generics_basic.py:172: error: If Generic[...] or Protocol[...] is present it should list all type variables [misc]
generics_basic.py:208: error: Invalid metaclass "GenericMeta[T]" [misc]
generics_basic.py:208: error: Invalid metaclass "GenericMeta[T]" [metaclass]
"""
4 changes: 2 additions & 2 deletions conformance/results/zuban/generics_defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ParamSpec after TypeVarTuple is not always handled correctly
conformance_automated = "Fail"
errors_diff = """
Line 142: Expected 1 errors
Line 155: Unexpected errors ['generics_defaults.py:155: error: Expression is of type "Type[Foo6[int, [*Any, **Any]]]", not "Type[Foo6[int, str, [float, bool]]]" [misc]', 'generics_defaults.py:155: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]']
Line 155: Unexpected errors ['generics_defaults.py:155: error: Expression is of type "type[Foo6[int, [*Any, **Any]]]", not "type[Foo6[int, str, [float, bool]]]" [misc]', 'generics_defaults.py:155: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]']
Line 170: Unexpected errors ['generics_defaults.py:170: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [misc]']
"""
output = """
Expand All @@ -16,7 +16,7 @@ generics_defaults.py:50: error: "AllTheDefaults" expects between 2 and 5 type ar
generics_defaults.py:107: error: TypeVar default must be a subtype of the bound type [misc]
generics_defaults.py:114: error: TypeVar default must be one of the constraint types [misc]
generics_defaults.py:131: error: Expression is of type "int", not "Any" [misc]
generics_defaults.py:155: error: Expression is of type "Type[Foo6[int, [*Any, **Any]]]", not "Type[Foo6[int, str, [float, bool]]]" [misc]
generics_defaults.py:155: error: Expression is of type "type[Foo6[int, [*Any, **Any]]]", not "type[Foo6[int, str, [float, bool]]]" [misc]
generics_defaults.py:155: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]
generics_defaults.py:170: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [misc]
"""
6 changes: 3 additions & 3 deletions conformance/results/zuban/generics_syntax_scoping.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ errors_diff = """
Line 31: Unexpected errors ['generics_syntax_scoping.py:31: error: Type variable "generics_syntax_scoping.T" is unbound [misc]']
Line 56: Unexpected errors ['generics_syntax_scoping.py:56: error: Name "S" already defined on line 55 [no-redef]']
Line 62: Unexpected errors ['generics_syntax_scoping.py:62: error: Expression is of type "TypeVar", not "str" [misc]']
Line 88: Unexpected errors ['generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "Type[ClassE]"; expected "Callable[Never, Never]" [arg-type]']
Line 88: Unexpected errors ['generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "type[ClassE]"; expected "Callable[Never, Never]" [arg-type]']
Line 90: Unexpected errors ['generics_syntax_scoping.py:90: error: Name "T" already defined on line 89 [no-redef]']
Line 106: Unexpected errors ['generics_syntax_scoping.py:106: error: Name "T" already defined on line 105 [no-redef]']
Line 108: Unexpected errors ['generics_syntax_scoping.py:108: error: Expression is of type "TypeVar", not "int" [misc]']
Expand All @@ -24,13 +24,13 @@ generics_syntax_scoping.py:31: error: Type variable "generics_syntax_scoping.T"
generics_syntax_scoping.py:31: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class)
generics_syntax_scoping.py:31: note: (Hint: Use "T" in function signature to bind "T" inside a function)
generics_syntax_scoping.py:35: error: Name "T" is used before definition [used-before-def]
generics_syntax_scoping.py:44: error: Argument 1 has incompatible type "Type[ClassD]"; expected "Callable[Never, Never]" [arg-type]
generics_syntax_scoping.py:44: error: Argument 1 has incompatible type "type[ClassD]"; expected "Callable[Never, Never]" [arg-type]
generics_syntax_scoping.py:44: error: Name "T" is used before definition [used-before-def]
generics_syntax_scoping.py:44: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type]
generics_syntax_scoping.py:44: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
generics_syntax_scoping.py:56: error: Name "S" already defined on line 55 [no-redef]
generics_syntax_scoping.py:62: error: Expression is of type "TypeVar", not "str" [misc]
generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "Type[ClassE]"; expected "Callable[Never, Never]" [arg-type]
generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "type[ClassE]"; expected "Callable[Never, Never]" [arg-type]
generics_syntax_scoping.py:90: error: Name "T" already defined on line 89 [no-redef]
generics_syntax_scoping.py:92: error: "T" already defined as a type parameter [misc]
generics_syntax_scoping.py:95: error: "T" already defined as a type parameter [misc]
Expand Down
1 change: 1 addition & 0 deletions conformance/results/zuban/overloads_definitions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ overloads_definitions.py:28: error: An overloaded function outside a stub file m
overloads_definitions.py:59: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
overloads_definitions.py:71: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc]
overloads_definitions.py:84: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc]
overloads_definitions.py:93: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc]
overloads_definitions.py:122: error: @final should be applied only to overload implementation [misc]
overloads_definitions.py:136: error: @final should be applied only to overload implementation [misc]
overloads_definitions.py:141: error: @final should be applied only to overload implementation [misc]
Expand Down
Loading