diff --git a/conformance/results/mypy/dataclasses_hash.toml b/conformance/results/mypy/dataclasses_hash.toml index 7af6dcbd..08809153 100644 --- a/conformance/results/mypy/dataclasses_hash.toml +++ b/conformance/results/mypy/dataclasses_hash.toml @@ -1,11 +1,19 @@ -conformant = "Partial" +conformant = "Unsupported" notes = """ +Does not synthesize `__hash__ = None` as a class attribute for unhashable dataclasses. +Does not report when an unhashable dataclass has `__hash__` called directly on an instance. Does not report when dataclass is not compatible with Hashable protocol. """ output = """ +dataclasses_hash.py:14: error: Expression is of type "Callable[[object], int]", not "None" [assert-type] +dataclasses_hash.py:36: error: Expression is of type "Callable[[object], int]", not "None" [assert-type] """ conformance_automated = "Fail" errors_diff = """ -Line 15: Expected 1 errors -Line 32: Expected 1 errors +Line 17: Expected 1 errors +Line 18: Expected 1 errors +Line 39: Expected 1 errors +Line 40: Expected 1 errors +Line 14: Unexpected errors ['dataclasses_hash.py:14: error: Expression is of type "Callable[[object], int]", not "None" [assert-type]'] +Line 36: Unexpected errors ['dataclasses_hash.py:36: error: Expression is of type "Callable[[object], int]", not "None" [assert-type]'] """ diff --git a/conformance/results/pyrefly/dataclasses_hash.toml b/conformance/results/pyrefly/dataclasses_hash.toml index 2d674772..4c89ed9c 100644 --- a/conformance/results/pyrefly/dataclasses_hash.toml +++ b/conformance/results/pyrefly/dataclasses_hash.toml @@ -3,6 +3,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR dataclasses_hash.py:15:16-22: `DC1` is not assignable to `Hashable` [bad-assignment] -ERROR dataclasses_hash.py:32:16-22: `DC3` is not assignable to `Hashable` [bad-assignment] +ERROR dataclasses_hash.py:17:1-16: Expected a callable, got `None` [not-callable] +ERROR dataclasses_hash.py:18:16-22: `DC1` is not assignable to `Hashable` [bad-assignment] +ERROR dataclasses_hash.py:39:1-16: Expected a callable, got `None` [not-callable] +ERROR dataclasses_hash.py:40:16-22: `DC3` is not assignable to `Hashable` [bad-assignment] """ diff --git a/conformance/results/pyright/dataclasses_hash.toml b/conformance/results/pyright/dataclasses_hash.toml index bd6c15f8..7e05cf57 100644 --- a/conformance/results/pyright/dataclasses_hash.toml +++ b/conformance/results/pyright/dataclasses_hash.toml @@ -1,10 +1,12 @@ conformant = "Pass" output = """ -dataclasses_hash.py:15:16 - error: Type "DC1" is not assignable to declared type "Hashable" +dataclasses_hash.py:17:1 - error: Object of type "None" cannot be called (reportOptionalCall) +dataclasses_hash.py:18:16 - error: Type "DC1" is not assignable to declared type "Hashable" "DC1" is incompatible with protocol "Hashable" "__hash__" is an incompatible type Type "None" is not assignable to type "() -> int" (reportAssignmentType) -dataclasses_hash.py:32:16 - error: Type "DC3" is not assignable to declared type "Hashable" +dataclasses_hash.py:39:1 - error: Object of type "None" cannot be called (reportOptionalCall) +dataclasses_hash.py:40:16 - error: Type "DC3" is not assignable to declared type "Hashable" "DC3" is incompatible with protocol "Hashable" "__hash__" is an incompatible type Type "None" is not assignable to type "() -> int" (reportAssignmentType) diff --git a/conformance/results/results.html b/conformance/results/results.html index a99606a6..058d7e55 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -737,9 +737,9 @@
Does not report when dataclass is not compatible with Hashable protocol.
Does not synthesize `__hash__ = None` as a class attribute for unhashable dataclasses.
Does not report when an unhashable dataclass has `__hash__` called directly on an instance.
Does not report when dataclass is not compatible with Hashable protocol.
Does not synthesize a `__hash__ = None` class attribute for unhashable dataclasses.