You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doesn't catch illegal field name starting with underscore
4
+
"""
5
+
conformance_automated = "Fail"
3
6
errors_diff = """
7
+
Line 76: Expected 1 errors
4
8
"""
5
9
output = """
6
10
ERROR namedtuples_define_class.py:32:7-12: Index 3 out of range for tuple with 3 elements [index-error]
@@ -11,8 +15,9 @@ ERROR namedtuples_define_class.py:46:15-17: Argument `Literal['']` is not assign
11
15
ERROR namedtuples_define_class.py:47:24-25: Argument `Literal[3]` is not assignable to parameter `units` with type `str` in function `Point.__new__` [bad-argument-type]
12
16
ERROR namedtuples_define_class.py:48:22-24: Expected 3 positional arguments, got 4 in function `Point.__new__` [bad-argument-count]
13
17
ERROR namedtuples_define_class.py:49:23-28: Unexpected keyword argument `other` in function `Point.__new__` [unexpected-keyword]
14
-
ERROR namedtuples_define_class.py:59:5-13: NamedTuple field 'latitude' without a default may not follow NamedTuple field with a default [bad-class-definition]
15
-
ERROR namedtuples_define_class.py:79:5-6: Cannot override named tuple element `x` [bad-override]
16
-
ERROR namedtuples_define_class.py:98:19-22: Argument `float` is not assignable to parameter `value` with type `str` in function `Property.__new__` [bad-argument-type]
17
-
ERROR namedtuples_define_class.py:105:7-11: Named tuples do not support multiple inheritance [invalid-inheritance]
18
+
ERROR namedtuples_define_class.py:69:20-22: Expected 2 positional arguments, got 3 in function `Point2.__new__` [bad-argument-count]
19
+
ERROR namedtuples_define_class.py:86:5-13: NamedTuple field 'latitude' without a default may not follow NamedTuple field with a default [bad-class-definition]
20
+
ERROR namedtuples_define_class.py:106:5-6: Cannot override named tuple element `x` [bad-override]
21
+
ERROR namedtuples_define_class.py:125:19-22: Argument `float` is not assignable to parameter `value` with type `str` in function `Property.__new__` [bad-argument-type]
22
+
ERROR namedtuples_define_class.py:132:7-11: Named tuples do not support multiple inheritance [invalid-inheritance]
Copy file name to clipboardExpand all lines: conformance/results/pyright/namedtuples_define_functional.toml
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
conformant = "Pass"
1
+
conformant = "Partial"
2
2
output = """
3
3
namedtuples_define_functional.py:16:8 - error: Argument missing for parameter "y" (reportCallIssue)
4
4
namedtuples_define_functional.py:21:8 - error: Arguments missing for parameters "x", "y" (reportCallIssue)
@@ -15,8 +15,13 @@ namedtuples_define_functional.py:43:17 - error: Argument of type "float" cannot
15
15
namedtuples_define_functional.py:52:31 - error: Names within a named tuple must be unique (reportGeneralTypeIssues)
16
16
namedtuples_define_functional.py:53:33 - error: Field names cannot be a keyword (reportGeneralTypeIssues)
17
17
namedtuples_define_functional.py:54:33 - error: Field names cannot be a keyword (reportGeneralTypeIssues)
18
-
namedtuples_define_functional.py:66:1 - error: Argument missing for parameter "a" (reportCallIssue)
18
+
namedtuples_define_functional.py:55:33 - error: Named tuple field names cannot start with an underscore (reportGeneralTypeIssues)
19
+
namedtuples_define_functional.py:59:33 - error: Named tuple field names cannot start with an underscore (reportGeneralTypeIssues)
20
+
namedtuples_define_functional.py:60:13 - error: No parameter named "_1" (reportCallIssue)
21
+
namedtuples_define_functional.py:69:1 - error: Argument missing for parameter "a" (reportCallIssue)
19
22
"""
20
-
conformance_automated = "Pass"
23
+
conformance_automated = "Fail"
21
24
errors_diff = """
25
+
Line 59: Unexpected errors ['namedtuples_define_functional.py:59:33 - error: Named tuple field names cannot start with an underscore (reportGeneralTypeIssues)']
26
+
Line 60: Unexpected errors ['namedtuples_define_functional.py:60:13 - error: No parameter named "_1" (reportCallIssue)']
Copy file name to clipboardExpand all lines: conformance/results/results.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -915,11 +915,11 @@ <h3>Python Type System Conformance Test Results</h3>
915
915
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject override of named tuple attribute in child class.</p></span></div></th>
916
916
<thclass="column col2 conformant">Pass</th>
917
917
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject override of named tuple attribute in child class.</p></span></div></th>
918
-
<thclass="column col2 conformant">Pass</th>
918
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Doesn't catch illegal field name starting with underscore</p></span></div></th>
0 commit comments