--- a/src/eric7/HexEdit/HexEditChunks.py Wed Nov 09 11:32:13 2022 +0100 +++ b/src/eric7/HexEdit/HexEditChunks.py Wed Nov 09 15:05:06 2022 +0100 @@ -9,21 +9,20 @@ import sys +from dataclasses import dataclass, field + from PyQt6.QtCore import QBuffer, QByteArray, QIODevice +@dataclass class HexEditChunk: """ Class implementing a container for the data chunks. """ - def __init__(self): - """ - Constructor - """ - self.data = bytearray() - self.dataChanged = bytearray() - self.absPos = 0 + data: bytearray = field(default_factory=bytearray) + dataChanged: bytearray = field(default_factory=bytearray) + absPos: int = 0 class HexEditChunks: