We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32299c8 commit 8f52a8cCopy full SHA for 8f52a8c
tests/test_class_schema.py
@@ -227,7 +227,7 @@ class A:
227
schema.load({"data": data})
228
229
def test_final_infers_type_from_default(self):
230
- # @dataclasses.dataclass
+ # @dataclasses.dataclass(frozen=True)
231
class A:
232
data: Final = "a"
233
@@ -238,7 +238,8 @@ class B:
238
# NOTE: This workaround is needed to avoid a Mypy crash.
239
# See: https://github.com/python/mypy/issues/10090#issuecomment-865971891
240
if not TYPE_CHECKING:
241
- A = dataclasses.dataclass(A)
+ frozen_dataclass = dataclasses.dataclass(frozen=True)
242
+ A = frozen_dataclass(A)
243
B = dataclasses.dataclass(B)
244
245
with self.assertWarns(Warning):
0 commit comments