From f4768e4c66b55682059028460d1d7633b350e33f Mon Sep 17 00:00:00 2001 From: George Zubrienko Date: Thu, 5 Oct 2023 11:16:01 +0200 Subject: [PATCH] Memory violation --- tests/entities.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/entities.py b/tests/entities.py index 2c5b3a30..baa5b59b 100644 --- a/tests/entities.py +++ b/tests/entities.py @@ -383,15 +383,8 @@ class DataClassWithCounter: c: Counter[str] -if sys.version_info.minor < 11: - @dataclass_json - @dataclass - class DataClassWithSelf(DataClassJsonMixin): - id: str - ref: Optional['DataClassWithSelf'] -else: - @dataclass_json - @dataclass - class DataClassWithSelf(DataClassJsonMixin): - id: str - ref: Optional[DataClassWithSelf] +@dataclass_json +@dataclass +class DataClassWithSelf(DataClassJsonMixin): + id: str + ref: Optional['DataClassWithSelf']