src/eric7/QScintilla/Exporters/ExporterPDF.py

branch
eric7
changeset 9500
5771348ded12
parent 9487
78cb053591c9
child 9576
be9f8e7e42e0
--- a/src/eric7/QScintilla/Exporters/ExporterPDF.py	Wed Nov 09 11:32:13 2022 +0100
+++ b/src/eric7/QScintilla/Exporters/ExporterPDF.py	Wed Nov 09 15:05:06 2022 +0100
@@ -10,6 +10,8 @@
 # This code is a port of the C++ code found in SciTE 1.74
 # Original code: Copyright 1998-2006 by Neil Hodgson <neilh@scintilla.org>
 
+from dataclasses import dataclass
+
 from PyQt6.Qsci import QsciScintilla
 from PyQt6.QtGui import QColor, QFontInfo
 
@@ -50,17 +52,14 @@
 }
 
 
+@dataclass
 class PDFStyle:
     """
     Simple class to store the values of a PDF style.
     """
 
-    def __init__(self):
-        """
-        Constructor
-        """
-        self.fore = ""
-        self.font = 0
+    fore: str = ""
+    font: int = 0
 
 
 class PDFObjectTracker:

eric ide

mercurial