-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(very) initial steps on conformance tests
- Loading branch information
Showing
10 changed files
with
180 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
conformant = "Pass" | ||
conformant = "Partial" | ||
notes = """ | ||
Does not allow an overload with no implementation in an abstract base class. | ||
""" | ||
output = """ | ||
overloads_basic.py:37: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload] | ||
overloads_basic.py:37: note: Possible overload variants: | ||
overloads_basic.py:37: note: def __getitem__(self, int, /) -> int | ||
overloads_basic.py:37: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes | ||
overloads_basic.py:62: error: Single overload definition, multiple required [misc] | ||
overloads_basic.py:74: error: An overloaded function outside a stub file must have an implementation [no-overload-impl] | ||
overloads_basic.py:41: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload] | ||
overloads_basic.py:41: note: Possible overload variants: | ||
overloads_basic.py:41: note: def __getitem__(self, int, /) -> int | ||
overloads_basic.py:41: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes | ||
overloads_basic.py:66: error: Single overload definition, multiple required [misc] | ||
overloads_basic.py:78: error: An overloaded function outside a stub file must have an implementation [no-overload-impl] | ||
overloads_basic.py:101: error: An overloaded function outside a stub file must have an implementation [no-overload-impl] | ||
overloads_basic.py:116: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc] | ||
overloads_basic.py:126: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc] | ||
overloads_basic.py:126: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc] | ||
overloads_basic.py:129: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc] | ||
""" | ||
conformance_automated = "Pass" | ||
conformance_automated = "Fail" | ||
errors_diff = """ | ||
Line 101: Unexpected errors ['overloads_basic.py:101: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]'] | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "mypy 1.14.0" | ||
test_duration = 1.6 | ||
version = "mypy 1.14.1" | ||
test_duration = 1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
conformant = "Pass" | ||
conformant = "Partial" | ||
notes = """ | ||
Does not allow an overload with no implementation in a Protocol or an abstract base class. | ||
""" | ||
output = """ | ||
overloads_basic.py:37:2 Incompatible parameter type [6]: In call `Bytes.__getitem__`, for 1st positional argument, expected `int` but got `str`. | ||
overloads_basic.py:63:0 Incompatible overload [43]: At least two overload signatures must be present. | ||
overloads_basic.py:75:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation. | ||
overloads_basic.py:41:2 Incompatible parameter type [6]: In call `Bytes.__getitem__`, for 1st positional argument, expected `int` but got `str`. | ||
overloads_basic.py:67:0 Incompatible overload [43]: At least two overload signatures must be present. | ||
overloads_basic.py:79:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation. | ||
overloads_basic.py:92:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation. | ||
overloads_basic.py:102:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation. | ||
overloads_basic.py:118:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `118`. | ||
overloads_basic.py:123:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `123`. | ||
overloads_basic.py:126:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). | ||
overloads_basic.py:131:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `131`. | ||
overloads_basic.py:136:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `136`. | ||
overloads_basic.py:139:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). | ||
""" | ||
conformance_automated = "Pass" | ||
conformance_automated = "Fail" | ||
errors_diff = """ | ||
Line 92: Unexpected errors ['overloads_basic.py:92:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.'] | ||
Line 102: Unexpected errors ['overloads_basic.py:102:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.'] | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "pyre 0.9.23" | ||
test_duration = 7.3 | ||
test_duration = 5.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
conformant = "Pass" | ||
conformant = "Partial" | ||
notes = """ | ||
Does not allow an overload with no implementation in an abstract base class. | ||
""" | ||
output = """ | ||
overloads_basic.py:37:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue) | ||
overloads_basic.py:37:1 - error: Argument of type "Literal['']" cannot be assigned to parameter "__s" of type "slice[Any, Any, Any]" in function "__getitem__" | ||
overloads_basic.py:41:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue) | ||
overloads_basic.py:41:1 - error: Argument of type "Literal['']" cannot be assigned to parameter "__s" of type "slice[Any, Any, Any]" in function "__getitem__" | ||
"Literal['']" is not assignable to "slice[Any, Any, Any]" (reportArgumentType) | ||
overloads_basic.py:63:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload) | ||
overloads_basic.py:75:5 - error: "func2" is marked as overload, but no implementation is provided (reportNoOverloadImplementation) | ||
overloads_basic.py:67:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload) | ||
overloads_basic.py:79:5 - error: "func2" is marked as overload, but no implementation is provided (reportNoOverloadImplementation) | ||
overloads_basic.py:102:9 - error: "func4" is marked as overload, but no implementation is provided (reportNoOverloadImplementation) | ||
overloads_basic.py:118:9 - error: Overloads for "func5" use @staticmethod inconsistently (reportInconsistentOverload) | ||
overloads_basic.py:126:9 - error: Overloaded implementation is not consistent with signature of overload 1 | ||
Type "(self: Self@C, x: int | str) -> (int | str)" is not assignable to type "(x: int) -> int" | ||
Parameter name mismatch: "x" versus "self" | ||
Parameter 1: type "int" is incompatible with type "Self@C" | ||
Type "int" is not assignable to type "Self@C" | ||
Extra parameter "x" (reportInconsistentOverload) | ||
overloads_basic.py:126:9 - error: Overloaded implementation is not consistent with signature of overload 2 | ||
Type "(self: Self@C, x: int | str) -> (int | str)" is not assignable to type "(x: str) -> str" | ||
Parameter name mismatch: "x" versus "self" | ||
Parameter 1: type "str" is incompatible with type "Self@C" | ||
Type "str" is not assignable to type "Self@C" | ||
Extra parameter "x" (reportInconsistentOverload) | ||
overloads_basic.py:131:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload) | ||
overloads_basic.py:139:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName) | ||
""" | ||
conformance_automated = "Pass" | ||
conformance_automated = "Fail" | ||
errors_diff = """ | ||
Line 102: Unexpected errors ['overloads_basic.py:102:9 - error: "func4" is marked as overload, but no implementation is provided (reportNoOverloadImplementation)'] | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "pyright 1.1.391" | ||
test_duration = 1.2 | ||
test_duration = 1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "pytype 2024.10.11" | ||
test_duration = 37.2 | ||
test_duration = 30.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters