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
18 changes: 9 additions & 9 deletions conformance/results/mypy/historical_positional.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ Applies legacy positional-only rules when PEP 570 syntax is used.
output = """
historical_positional.py:13: note: "f1" defined here
historical_positional.py:18: error: Unexpected keyword argument "__x" for "f1" [call-arg]
historical_positional.py:29: note: "f3" defined here
historical_positional.py:32: error: Unexpected keyword argument "__y" for "f3" [call-arg]
historical_positional.py:36: note: "m1" of "A" defined here
historical_positional.py:43: error: Unexpected keyword argument "__x" for "m1" of "A" [call-arg]
historical_positional.py:50: note: "f4" defined here
historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4" [call-arg]
historical_positional.py:45: note: "f3" defined here
historical_positional.py:48: error: Unexpected keyword argument "__y" for "f3" [call-arg]
historical_positional.py:52: note: "m1" of "A" defined here
historical_positional.py:59: error: Unexpected keyword argument "__x" for "m1" of "A" [call-arg]
historical_positional.py:66: note: "f4" defined here
historical_positional.py:69: error: Unexpected keyword argument "__y" for "f4" [call-arg]
"""
conformance_automated = "Fail"
errors_diff = """
Line 26: Expected 1 errors
Line 38: Expected 1 errors
Line 32: Unexpected errors ['historical_positional.py:32: error: Unexpected keyword argument "__y" for "f3" [call-arg]']
Line 53: Unexpected errors ['historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4" [call-arg]']
Line 54: Expected 1 errors
Line 48: Unexpected errors ['historical_positional.py:48: error: Unexpected keyword argument "__y" for "f3" [call-arg]']
Line 69: Unexpected errors ['historical_positional.py:69: error: Unexpected keyword argument "__y" for "f4" [call-arg]']
"""
4 changes: 2 additions & 2 deletions conformance/results/pyrefly/historical_positional.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ errors_diff = """
output = """
ERROR historical_positional.py:18:4-7: Expected argument `__x` to be positional in function `f1` [unexpected-keyword]
ERROR historical_positional.py:26:16-19: Positional-only parameter `__y` cannot appear after keyword parameters [bad-function-definition]
ERROR historical_positional.py:38:26-29: Positional-only parameter `__y` cannot appear after keyword parameters [bad-function-definition]
ERROR historical_positional.py:43:6-9: Expected argument `__x` to be positional in function `A.m1` [unexpected-keyword]
ERROR historical_positional.py:54:26-29: Positional-only parameter `__y` cannot appear after keyword parameters [bad-function-definition]
ERROR historical_positional.py:59:6-9: Expected argument `__x` to be positional in function `A.m1` [unexpected-keyword]
"""
4 changes: 2 additions & 2 deletions conformance/results/pyrefly/protocols_variance.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ errors_diff = """
Line 21: Expected 1 errors
Line 40: Expected 1 errors
Line 56: Expected 1 errors
Line 61: Expected 1 errors
Line 66: Expected 1 errors
Line 71: Expected 1 errors
Line 104: Expected 1 errors
Lines 61, 62: Expected error (tag 'covariant_in_input')
Lines 71, 72: Expected error (tag 'contravariant_in_output')
"""
output = """
"""
4 changes: 2 additions & 2 deletions conformance/results/pyright/historical_positional.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ conformant = "Pass"
output = """
historical_positional.py:18:8 - error: Expected 1 more positional argument (reportCallIssue)
historical_positional.py:26:16 - error: Position-only parameter not allowed after parameter that is not position-only (reportGeneralTypeIssues)
historical_positional.py:38:26 - error: Position-only parameter not allowed after parameter that is not position-only (reportGeneralTypeIssues)
historical_positional.py:43:10 - error: Expected 1 more positional argument (reportCallIssue)
historical_positional.py:54:26 - error: Position-only parameter not allowed after parameter that is not position-only (reportGeneralTypeIssues)
historical_positional.py:59:10 - error: Expected 1 more positional argument (reportCallIssue)
"""
conformance_automated = "Pass"
errors_diff = """
Expand Down
4 changes: 2 additions & 2 deletions conformance/results/zuban/historical_positional.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ errors_diff = """
output = """
historical_positional.py:18: error: Unexpected keyword argument "__x" for "f1" [call-arg]
historical_positional.py:26: error: A positional only param starting with two underscores is not allowed after a positional or keyword param [misc]
historical_positional.py:38: error: A positional only param starting with two underscores is not allowed after a positional or keyword param [misc]
historical_positional.py:43: error: Unexpected keyword argument "__x" for "m1" of "A" [call-arg]
historical_positional.py:54: error: A positional only param starting with two underscores is not allowed after a positional or keyword param [misc]
historical_positional.py:59: error: Unexpected keyword argument "__x" for "m1" of "A" [call-arg]
"""
8 changes: 4 additions & 4 deletions conformance/tests/protocols_variance.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def m1(self, p0: T1) -> None:
...


class Protocol5(Protocol[T1_co]): # E: T1_co should be contravariant
def m1(self, p0: T1_co) -> None: # E?: Incorrect use of covariant TypeVar
class Protocol5(Protocol[T1_co]): # E[covariant_in_input+]
def m1(self, p0: T1_co) -> None: # E[covariant_in_input+]
...


Expand All @@ -68,8 +68,8 @@ def m1(self) -> T1:
...


class Protocol7(Protocol[T1_contra]): # E: T1_contra should be covariant
def m1(self) -> T1_contra: # E?: Incorrect use of contravariant TypeVar
class Protocol7(Protocol[T1_contra]): # E[contravariant_in_output+]
def m1(self) -> T1_contra: # E[contravariant_in_output+]
...


Expand Down