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
25 changes: 13 additions & 12 deletions conformance/results/mypy/dataclasses_usage.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ notes = """
Does not detect unannotated usage of `dataclasses.field()`.
"""
output = """
dataclasses_usage.py:35: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass [misc]
dataclasses_usage.py:50: error: Missing positional argument "unit_price" in call to "InventoryItem" [call-arg]
dataclasses_usage.py:51: error: Argument 2 to "InventoryItem" has incompatible type "str"; expected "float" [arg-type]
dataclasses_usage.py:52: error: Too many arguments for "InventoryItem" [call-arg]
dataclasses_usage.py:61: error: Attributes without a default cannot follow attributes with one [misc]
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: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
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]
dataclasses_usage.py:36: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass [misc]
dataclasses_usage.py:51: error: Missing positional argument "unit_price" in call to "InventoryItem" [call-arg]
dataclasses_usage.py:52: error: Argument 2 to "InventoryItem" has incompatible type "str"; expected "float" [arg-type]
dataclasses_usage.py:53: error: Too many arguments for "InventoryItem" [call-arg]
dataclasses_usage.py:62: error: Attributes without a default cannot follow attributes with one [misc]
dataclasses_usage.py:68: error: Attributes without a default cannot follow attributes with one [misc]
dataclasses_usage.py:74: error: Attributes without a default cannot follow attributes with one [misc]
dataclasses_usage.py:84: error: Too many arguments for "DC4" [call-arg]
dataclasses_usage.py:89: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
dataclasses_usage.py:128: error: Too many arguments for "DC7" [call-arg]
dataclasses_usage.py:131: error: Missing positional argument "y" in call to "DC8" [call-arg]
dataclasses_usage.py:180: error: Too many arguments for "DC13" [call-arg]
dataclasses_usage.py:246: error: Too many arguments for "DC19" [call-arg]
"""
conformance_automated = "Pass"
errors_diff = """
Expand Down
1 change: 1 addition & 0 deletions conformance/results/mypy/enums_definition.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ conformant = "Pass"
errors_diff = """
"""
output = """
enums_definition.py:92: error: "type[Color12]" has no attribute "BLUE" [attr-defined]
"""
conformance_automated = "Pass"
44 changes: 26 additions & 18 deletions conformance/results/mypy/namedtuples_define_class.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
conformant = "Partial"
notes = """
Does not reject override of named tuple attribute in child class.
Does not support version-conditional fields.
"""
output = """
namedtuples_define_class.py:32: error: Tuple index out of range [misc]
namedtuples_define_class.py:33: error: Tuple index out of range [misc]
namedtuples_define_class.py:44: error: Missing positional argument "y" in call to "Point" [call-arg]
namedtuples_define_class.py:34: error: Tuple index out of range [misc]
namedtuples_define_class.py:45: error: Missing positional argument "y" in call to "Point" [call-arg]
namedtuples_define_class.py:46: error: Argument 2 to "Point" has incompatible type "str"; expected "int" [arg-type]
namedtuples_define_class.py:47: error: Argument "units" to "Point" has incompatible type "int"; expected "str" [arg-type]
namedtuples_define_class.py:48: error: Too many arguments for "Point" [call-arg]
namedtuples_define_class.py:49: error: Unexpected keyword argument "other" for "Point" [call-arg]
namedtuples_define_class.py:59: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]
namedtuples_define_class.py:65: error: Missing positional argument "units" in call to "Point2" [call-arg]
namedtuples_define_class.py:67: error: Too many values to unpack (2 expected, 3 provided) [misc]
namedtuples_define_class.py:76: error: NamedTuple field name cannot start with an underscore: _y [misc]
namedtuples_define_class.py:86: error: Non-default NamedTuple fields cannot follow default fields [misc]
namedtuples_define_class.py:125: error: Argument 2 to "Property" has incompatible type "float"; expected "str" [arg-type]
namedtuples_define_class.py:132: error: NamedTuple should be a single base [misc]
namedtuples_define_class.py:46: error: Missing positional argument "y" in call to "Point" [call-arg]
namedtuples_define_class.py:47: error: Argument 2 to "Point" has incompatible type "str"; expected "int" [arg-type]
namedtuples_define_class.py:48: error: Argument "units" to "Point" has incompatible type "int"; expected "str" [arg-type]
namedtuples_define_class.py:49: error: Too many arguments for "Point" [call-arg]
namedtuples_define_class.py:50: error: Unexpected keyword argument "other" for "Point" [call-arg]
namedtuples_define_class.py:60: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]
namedtuples_define_class.py:66: error: Missing positional argument "units" in call to "Point2" [call-arg]
namedtuples_define_class.py:68: error: Too many values to unpack (2 expected, 3 provided) [misc]
namedtuples_define_class.py:77: error: NamedTuple field name cannot start with an underscore: _y [misc]
namedtuples_define_class.py:87: error: Non-default NamedTuple fields cannot follow default fields [misc]
namedtuples_define_class.py:114: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]
namedtuples_define_class.py:116: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]
namedtuples_define_class.py:120: error: Too many arguments for "ConditionalField" [call-arg]
namedtuples_define_class.py:121: error: Too many arguments for "ConditionalField" [call-arg]
namedtuples_define_class.py:140: error: Argument 2 to "Property" has incompatible type "float"; expected "str" [arg-type]
namedtuples_define_class.py:147: error: NamedTuple should be a single base [misc]
"""
conformance_automated = "Fail"
errors_diff = """
Line 69: Expected 1 errors
Line 106: Expected 1 errors
Line 59: Unexpected errors ['namedtuples_define_class.py:59: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]']
Line 65: Unexpected errors ['namedtuples_define_class.py:65: error: Missing positional argument "units" in call to "Point2" [call-arg]']
Line 67: Unexpected errors ['namedtuples_define_class.py:67: error: Too many values to unpack (2 expected, 3 provided) [misc]']
Line 70: Expected 1 errors
Line 107: Expected 1 errors
Line 60: Unexpected errors ['namedtuples_define_class.py:60: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]']
Line 66: Unexpected errors ['namedtuples_define_class.py:66: error: Missing positional argument "units" in call to "Point2" [call-arg]']
Line 68: Unexpected errors ['namedtuples_define_class.py:68: error: Too many values to unpack (2 expected, 3 provided) [misc]']
Line 114: Unexpected errors ['namedtuples_define_class.py:114: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]']
Line 116: Unexpected errors ['namedtuples_define_class.py:116: error: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]" [misc]']
Line 120: Unexpected errors ['namedtuples_define_class.py:120: error: Too many arguments for "ConditionalField" [call-arg]']
"""
24 changes: 17 additions & 7 deletions conformance/results/mypy/typeddicts_class_syntax.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
conformant = "Pass"
conformant = "Partial"
notes = """
Does not support version-conditional items in TypedDict definitions.
"""
output = """
typeddicts_class_syntax.py:29: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:33: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:38: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:44: error: Unexpected keyword argument "metaclass" for "__init_subclass__" of "TypedDict" [call-arg]
typeddicts_class_syntax.py:49: error: Unexpected keyword argument "other" for "__init_subclass__" of "TypedDict" [call-arg]
typeddicts_class_syntax.py:30: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:34: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:39: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:45: error: Unexpected keyword argument "metaclass" for "__init_subclass__" of "TypedDict" [call-arg]
typeddicts_class_syntax.py:50: error: Unexpected keyword argument "other" for "__init_subclass__" of "TypedDict" [call-arg]
typeddicts_class_syntax.py:58: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:60: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]
typeddicts_class_syntax.py:64: error: Extra key "y" for TypedDict "ConditionalField" [typeddict-unknown-key]
typeddicts_class_syntax.py:65: error: Extra keys ("y", "z") for TypedDict "ConditionalField" [typeddict-unknown-key]
"""
conformance_automated = "Pass"
conformance_automated = "Fail"
errors_diff = """
Line 58: Unexpected errors ['typeddicts_class_syntax.py:58: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]']
Line 60: Unexpected errors ['typeddicts_class_syntax.py:60: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]']
Line 64: Unexpected errors ['typeddicts_class_syntax.py:64: error: Extra key "y" for TypedDict "ConditionalField" [typeddict-unknown-key]']
"""
23 changes: 12 additions & 11 deletions conformance/results/pycroscope/dataclasses_usage.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
./dataclasses_usage.py:50:5: Missing required argument 'unit_price' [incompatible_call]
./dataclasses_usage.py:51:27: Incompatible argument type for unit_price: expected float | int but got Literal['price'] [incompatible_argument]
./dataclasses_usage.py:52:5: Takes 3 positional arguments but 4 were given [incompatible_call]
./dataclasses_usage.py:58:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_dataclass]
./dataclasses_usage.py:64:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_dataclass]
./dataclasses_usage.py:70:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_dataclass]
./dataclasses_usage.py:83:5: Takes 1 positional arguments but 2 were given [incompatible_call]
./dataclasses_usage.py:88:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment]
./dataclasses_usage.py:127:0: Takes 1 positional arguments but 2 were given [incompatible_call]
./dataclasses_usage.py:130:0: Missing required argument 'y' [incompatible_call]
./dataclasses_usage.py:179:0: Takes 0 positional arguments but 1 were given [incompatible_call]
./dataclasses_usage.py:51:5: Missing required argument 'unit_price' [incompatible_call]
./dataclasses_usage.py:52:27: Incompatible argument type for unit_price: expected float | int but got Literal['price'] [incompatible_argument]
./dataclasses_usage.py:53:5: Takes 3 positional arguments but 4 were given [incompatible_call]
./dataclasses_usage.py:59:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_dataclass]
./dataclasses_usage.py:65:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_dataclass]
./dataclasses_usage.py:71:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_dataclass]
./dataclasses_usage.py:84:5: Takes 1 positional arguments but 2 were given [incompatible_call]
./dataclasses_usage.py:89:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment]
./dataclasses_usage.py:128:0: Takes 1 positional arguments but 2 were given [incompatible_call]
./dataclasses_usage.py:131:0: Missing required argument 'y' [incompatible_call]
./dataclasses_usage.py:180:0: Takes 0 positional arguments but 1 were given [incompatible_call]
./dataclasses_usage.py:246:0: Takes 2 positional arguments but 3 were given [incompatible_call]
"""
25 changes: 24 additions & 1 deletion conformance/results/pycroscope/enums_definition.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
conformance_automated = "Pass"
conformant = "Partial"
notes = """
Does not allow enum members to be conditional on version/platform checks.
"""
conformance_automated = "Fail"
errors_diff = """
Line 91: Unexpected errors ['./enums_definition.py:91:12: ./enums_definition.py.Color12 is not equivalent to Any[unannotated]']
"""
output = """
./enums_definition.py:34:12: enum.Enum has no attribute 'RED' [undefined_attribute]
./enums_definition.py:34:32: enum.Enum has no attribute 'RED' [undefined_attribute]
./enums_definition.py:35:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:35:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:36:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:36:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:37:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:37:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:38:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:38:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:39:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:39:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:40:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:40:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:41:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:41:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:91:12: ./enums_definition.py.Color12 is not equivalent to Any[unannotated]
./enums_definition.py:92:0: <class 'Color12'> has no attribute 'BLUE' [undefined_attribute]
"""
35 changes: 18 additions & 17 deletions conformance/results/pycroscope/namedtuples_define_class.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@ Does not support precise type inference for slices over namedtuples.
"""
conformance_automated = "Fail"
errors_diff = """
Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: tuple is not equivalent to tuple[int, int]']
Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: tuple is not equivalent to tuple[int, int, str]']
Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: tuple is not equivalent to tuple[int, int]']
Line 31: Unexpected errors ['./namedtuples_define_class.py:31:12: tuple is not equivalent to tuple[int, int, str]']
"""
output = """
./namedtuples_define_class.py:29:12: tuple is not equivalent to tuple[int, int]
./namedtuples_define_class.py:30:12: tuple is not equivalent to tuple[int, int, str]
./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call]
./namedtuples_define_class.py:33:6: Tuple index out of range: Literal[-4] [incompatible_call]
./namedtuples_define_class.py:44:5: Missing required argument 'y' [incompatible_call]
./namedtuples_define_class.py:30:12: tuple is not equivalent to tuple[int, int]
./namedtuples_define_class.py:31:12: tuple is not equivalent to tuple[int, int, str]
./namedtuples_define_class.py:33:6: Tuple index out of range: Literal[3] [incompatible_call]
./namedtuples_define_class.py:34:6: Tuple index out of range: Literal[-4] [incompatible_call]
./namedtuples_define_class.py:45:5: Missing required argument 'y' [incompatible_call]
./namedtuples_define_class.py:46:14: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument]
./namedtuples_define_class.py:47:23: Incompatible argument type for units: expected str but got Literal[3] [incompatible_argument]
./namedtuples_define_class.py:48:5: Takes 3 positional arguments but 4 were given [incompatible_call]
./namedtuples_define_class.py:49:6: Got an unexpected keyword argument 'other' [incompatible_call]
./namedtuples_define_class.py:69:6: Takes 2 positional arguments but 3 were given [incompatible_call]
./namedtuples_define_class.py:76:4: NamedTuple field names cannot start with an underscore [invalid_namedtuple]
./namedtuples_define_class.py:86:4: NamedTuple fields without defaults cannot follow fields with defaults [invalid_namedtuple]
./namedtuples_define_class.py:106:4: Field 'x' conflicts with base NamedTuple field [incompatible_override]
./namedtuples_define_class.py:125:18: Incompatible argument type for value: expected str but got Literal[3.1] [incompatible_argument]
./namedtuples_define_class.py:132:23: NamedTuple classes may only inherit from NamedTuple and Generic [invalid_base]
./namedtuples_define_class.py:46:5: Missing required argument 'y' [incompatible_call]
./namedtuples_define_class.py:47:14: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument]
./namedtuples_define_class.py:48:23: Incompatible argument type for units: expected str but got Literal[3] [incompatible_argument]
./namedtuples_define_class.py:49:5: Takes 3 positional arguments but 4 were given [incompatible_call]
./namedtuples_define_class.py:50:6: Got an unexpected keyword argument 'other' [incompatible_call]
./namedtuples_define_class.py:70:6: Takes 2 positional arguments but 3 were given [incompatible_call]
./namedtuples_define_class.py:77:4: NamedTuple field names cannot start with an underscore [invalid_namedtuple]
./namedtuples_define_class.py:87:4: NamedTuple fields without defaults cannot follow fields with defaults [invalid_namedtuple]
./namedtuples_define_class.py:107:4: Field 'x' conflicts with base NamedTuple field [incompatible_override]
./namedtuples_define_class.py:121:0: Takes 2 positional arguments but 3 were given [incompatible_call]
./namedtuples_define_class.py:140:18: Incompatible argument type for value: expected str but got Literal[3.1] [incompatible_argument]
./namedtuples_define_class.py:147:23: NamedTuple classes may only inherit from NamedTuple and Generic [invalid_base]
"""
11 changes: 6 additions & 5 deletions conformance/results/pycroscope/typeddicts_class_syntax.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
./typeddicts_class_syntax.py:29:4: Methods are not allowed in TypedDict definitions [invalid_typeddict]
./typeddicts_class_syntax.py:34:4: Methods are not allowed in TypedDict definitions [invalid_typeddict]
./typeddicts_class_syntax.py:39:4: Methods are not allowed in TypedDict definitions [invalid_typeddict]
./typeddicts_class_syntax.py:44:31: TypedDict definitions cannot specify a metaclass [invalid_typeddict]
./typeddicts_class_syntax.py:49:31: Unexpected keyword argument 'other' in TypedDict definition [invalid_typeddict]
./typeddicts_class_syntax.py:30:4: Methods are not allowed in TypedDict definitions [invalid_typeddict]
./typeddicts_class_syntax.py:35:4: Methods are not allowed in TypedDict definitions [invalid_typeddict]
./typeddicts_class_syntax.py:40:4: Methods are not allowed in TypedDict definitions [invalid_typeddict]
./typeddicts_class_syntax.py:45:31: TypedDict definitions cannot specify a metaclass [invalid_typeddict]
./typeddicts_class_syntax.py:50:31: Unexpected keyword argument 'other' in TypedDict definition [invalid_typeddict]
./typeddicts_class_syntax.py:65:0: Got an unexpected keyword argument 'z' [incompatible_call]
"""
Loading