Remove all END Class comments
This commit is contained in:
@@ -26,11 +26,11 @@ from __future__ import annotations
|
||||
from math import ceil
|
||||
|
||||
from PyQt5.QtCore import QRect
|
||||
from PyQt5.QtGui import QBrush, QColor, QPaintEvent, QPainter, QPen
|
||||
from PyQt5.QtGui import QBrush, QColor, QPainter, QPaintEvent, QPen
|
||||
from PyQt5.QtWidgets import QProgressBar, QWidget
|
||||
|
||||
from novelwriter.types import (
|
||||
QtPaintAnitAlias, QtAlignCenter, QtRoundCap, QtSizeFixed, QtSolidLine,
|
||||
QtAlignCenter, QtPaintAnitAlias, QtRoundCap, QtSizeFixed, QtSolidLine,
|
||||
QtTransparent
|
||||
)
|
||||
|
||||
@@ -101,5 +101,3 @@ class NProgressCircle(QProgressBar):
|
||||
painter.setPen(self._tColor)
|
||||
painter.drawText(self._cRect, QtAlignCenter, self._text or f"{progress:.1f} %")
|
||||
return
|
||||
|
||||
# END Class NProgressCircle
|
||||
|
||||
@@ -27,8 +27,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from PyQt5.QtGui import QColor, QFont, QPalette
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QColor, QFont, QPalette
|
||||
from PyQt5.QtWidgets import (
|
||||
QAbstractButton, QFrame, QHBoxLayout, QLabel, QLayout, QScrollArea,
|
||||
QVBoxLayout, QWidget
|
||||
@@ -64,8 +64,6 @@ class NFixedPage(QFrame):
|
||||
self.setLayout(layout)
|
||||
return
|
||||
|
||||
# END Class NFixedPage
|
||||
|
||||
|
||||
class NScrollablePage(QScrollArea):
|
||||
"""Extension: Scrollable Page Widget
|
||||
@@ -89,8 +87,6 @@ class NScrollablePage(QScrollArea):
|
||||
self._widget.setLayout(layout)
|
||||
return
|
||||
|
||||
# END Class NScrollablePage
|
||||
|
||||
|
||||
class NScrollableForm(QScrollArea):
|
||||
"""Extension: Scrollable Form Widget
|
||||
@@ -235,8 +231,6 @@ class NScrollableForm(QScrollArea):
|
||||
self._layout.addStretch(1)
|
||||
return
|
||||
|
||||
# END Class NScrollableForm
|
||||
|
||||
|
||||
class NColourLabel(QLabel):
|
||||
"""Extension: A Coloured Label
|
||||
@@ -267,8 +261,6 @@ class NColourLabel(QLabel):
|
||||
|
||||
return
|
||||
|
||||
# END Class NColourLabel
|
||||
|
||||
|
||||
class NWrappedWidgetBox(QHBoxLayout):
|
||||
"""Extension: A Text-Wrapped Widget Box
|
||||
@@ -287,5 +279,3 @@ class NWrappedWidgetBox(QHBoxLayout):
|
||||
if after:
|
||||
self.addWidget(QLabel(after.lstrip()))
|
||||
return
|
||||
|
||||
# END Class NWrappedWidgetBox
|
||||
|
||||
@@ -24,8 +24,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from PyQt5.QtGui import QStatusTipEvent, QWheelEvent
|
||||
from PyQt5.QtCore import QEvent, QObject
|
||||
from PyQt5.QtGui import QStatusTipEvent, QWheelEvent
|
||||
from PyQt5.QtWidgets import QWidget
|
||||
|
||||
|
||||
@@ -63,13 +63,9 @@ class WheelEventFilter(QObject):
|
||||
self._locked = False
|
||||
return False
|
||||
|
||||
# END Class WheelEventFilter
|
||||
|
||||
|
||||
class StatusTipFilter(QObject):
|
||||
|
||||
def eventFilter(self, obj: QObject, event: QEvent) -> bool:
|
||||
"""Filter out status tip events on menus."""
|
||||
return True if isinstance(event, QStatusTipEvent) else super().eventFilter(obj, event)
|
||||
|
||||
# END Class StatusTipFilter
|
||||
|
||||
@@ -61,8 +61,6 @@ class NToolDialog(QDialog):
|
||||
QApplication.processEvents()
|
||||
return
|
||||
|
||||
# END Class NToolDialog
|
||||
|
||||
|
||||
class NNonBlockingDialog(QDialog):
|
||||
|
||||
@@ -80,8 +78,6 @@ class NNonBlockingDialog(QDialog):
|
||||
QApplication.processEvents()
|
||||
return
|
||||
|
||||
# END Class NNonBlockingDialog
|
||||
|
||||
|
||||
class NComboBox(QComboBox):
|
||||
|
||||
@@ -103,8 +99,6 @@ class NComboBox(QComboBox):
|
||||
self.setCurrentIndex(self.findData(default) if idx < 0 else idx)
|
||||
return
|
||||
|
||||
# END Class NComboBox
|
||||
|
||||
|
||||
class NSpinBox(QSpinBox):
|
||||
|
||||
@@ -120,8 +114,6 @@ class NSpinBox(QSpinBox):
|
||||
event.ignore()
|
||||
return
|
||||
|
||||
# END Class NSpinBox
|
||||
|
||||
|
||||
class NDoubleSpinBox(QDoubleSpinBox):
|
||||
|
||||
@@ -137,8 +129,6 @@ class NDoubleSpinBox(QDoubleSpinBox):
|
||||
event.ignore()
|
||||
return
|
||||
|
||||
# END Class NDoubleSpinBox
|
||||
|
||||
|
||||
class NIconToolButton(QToolButton):
|
||||
|
||||
@@ -156,8 +146,6 @@ class NIconToolButton(QToolButton):
|
||||
self.setIcon(SHARED.theme.getIcon(iconKey))
|
||||
return
|
||||
|
||||
# END Class NIconToolButton
|
||||
|
||||
|
||||
class NIconToggleButton(QToolButton):
|
||||
|
||||
@@ -177,5 +165,3 @@ class NIconToggleButton(QToolButton):
|
||||
iconSize = self.iconSize()
|
||||
self.setIcon(SHARED.theme.getToggleIcon(iconKey, (iconSize.width(), iconSize.height())))
|
||||
return
|
||||
|
||||
# END Class NUnfoldButton
|
||||
|
||||
@@ -29,8 +29,8 @@ from PyQt5.QtCore import pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtWidgets import QComboBox, QWidget
|
||||
|
||||
from novelwriter import SHARED
|
||||
from novelwriter.enum import nwItemClass
|
||||
from novelwriter.constants import nwLabels
|
||||
from novelwriter.enum import nwItemClass
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -126,5 +126,3 @@ class NovelSelector(QComboBox):
|
||||
if not self._blockSignal:
|
||||
self.novelSelectionChanged.emit(self.currentData())
|
||||
return
|
||||
|
||||
# END Class NovelSelector
|
||||
|
||||
@@ -25,15 +25,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from PyQt5.QtGui import QColor, QPaintEvent, QPainter, QPolygon
|
||||
from PyQt5.QtCore import QPoint, QRectF, QSize, Qt, pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtGui import QColor, QPainter, QPaintEvent, QPolygon
|
||||
from PyQt5.QtWidgets import (
|
||||
QAbstractButton, QAction, QButtonGroup, QLabel, QStyle,
|
||||
QStyleOptionToolButton, QToolBar, QToolButton, QWidget
|
||||
)
|
||||
|
||||
from novelwriter.types import (
|
||||
QtPaintAnitAlias, QtAlignLeft, QtMouseOver, QtNoBrush, QtNoPen,
|
||||
QtAlignLeft, QtMouseOver, QtNoBrush, QtNoPen, QtPaintAnitAlias,
|
||||
QtSizeExpanding, QtSizeFixed
|
||||
)
|
||||
|
||||
@@ -112,8 +112,6 @@ class NPagedSideBar(QToolBar):
|
||||
self.buttonClicked.emit(buttonId)
|
||||
return
|
||||
|
||||
# END Class NPagedSideBar
|
||||
|
||||
|
||||
class _NPagedToolButton(QToolButton):
|
||||
|
||||
@@ -190,8 +188,6 @@ class _NPagedToolButton(QToolButton):
|
||||
|
||||
return
|
||||
|
||||
# END Class _NPagedToolButton
|
||||
|
||||
|
||||
class _NPagedToolLabel(QLabel):
|
||||
|
||||
@@ -231,5 +227,3 @@ class _NPagedToolLabel(QLabel):
|
||||
paint.drawText(QRectF(self._lM, self._tM, tW, tH), QtAlignLeft, self.text())
|
||||
|
||||
return
|
||||
|
||||
# END Class _NPagedToolLabel
|
||||
|
||||
@@ -25,7 +25,7 @@ from __future__ import annotations
|
||||
|
||||
from math import ceil
|
||||
|
||||
from PyQt5.QtGui import QPaintEvent, QPainter
|
||||
from PyQt5.QtGui import QPainter, QPaintEvent
|
||||
from PyQt5.QtWidgets import QProgressBar, QWidget
|
||||
|
||||
from novelwriter.types import QtPaintAnitAlias
|
||||
@@ -51,5 +51,3 @@ class NProgressSimple(QProgressBar):
|
||||
painter.setBrush(self.palette().highlight())
|
||||
painter.drawRect(0, 0, progress, self.height())
|
||||
return
|
||||
|
||||
# END Class NProgressSimple
|
||||
|
||||
@@ -27,7 +27,7 @@ import logging
|
||||
|
||||
from typing import Literal
|
||||
|
||||
from PyQt5.QtGui import QColor, QPaintEvent, QPainter
|
||||
from PyQt5.QtGui import QColor, QPainter, QPaintEvent
|
||||
from PyQt5.QtWidgets import QAbstractButton, QWidget
|
||||
|
||||
from novelwriter.types import QtPaintAnitAlias
|
||||
@@ -75,5 +75,3 @@ class StatusLED(QAbstractButton):
|
||||
painter.setOpacity(1.0)
|
||||
painter.drawEllipse(1, 1, self.width() - 2, self.height() - 2)
|
||||
return
|
||||
|
||||
# END Class StatusLED
|
||||
|
||||
@@ -23,12 +23,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from PyQt5.QtGui import QMouseEvent, QPainter, QPaintEvent, QResizeEvent
|
||||
from PyQt5.QtCore import QEvent, QPropertyAnimation, Qt, pyqtProperty
|
||||
from PyQt5.QtGui import QMouseEvent, QPainter, QPaintEvent, QResizeEvent
|
||||
from PyQt5.QtWidgets import QAbstractButton, QWidget
|
||||
|
||||
from novelwriter import CONFIG, SHARED
|
||||
from novelwriter.types import QtPaintAnitAlias, QtMouseLeft, QtNoPen, QtSizeFixed
|
||||
from novelwriter.types import QtMouseLeft, QtNoPen, QtPaintAnitAlias, QtSizeFixed
|
||||
|
||||
|
||||
class NSwitch(QAbstractButton):
|
||||
@@ -133,5 +133,3 @@ class NSwitch(QAbstractButton):
|
||||
self.setCursor(Qt.CursorShape.PointingHandCursor)
|
||||
super().enterEvent(event)
|
||||
return
|
||||
|
||||
# END Class NSwitch
|
||||
|
||||
@@ -23,8 +23,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtCore import pyqtSignal
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QGridLayout, QLabel, QScrollArea, QWidget
|
||||
|
||||
from novelwriter.extensions.switch import NSwitch
|
||||
@@ -127,5 +127,3 @@ class NSwitchBox(QScrollArea):
|
||||
self._content.setRowStretch(self._index + 1, 1)
|
||||
self._index += 1
|
||||
return
|
||||
|
||||
# END Class NSwitchBox
|
||||
|
||||
@@ -26,16 +26,16 @@ from __future__ import annotations
|
||||
import json
|
||||
import logging
|
||||
|
||||
from time import sleep
|
||||
from datetime import datetime
|
||||
from time import sleep
|
||||
from urllib.error import HTTPError
|
||||
from urllib.request import Request, urlopen
|
||||
|
||||
from PyQt5.QtGui import QDesktopServices
|
||||
from PyQt5.QtCore import QObject, QRunnable, QUrl, pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtGui import QDesktopServices
|
||||
from PyQt5.QtWidgets import QLabel, QVBoxLayout, QWidget
|
||||
|
||||
from novelwriter import CONFIG, SHARED, __version__, __date__, __domain__
|
||||
from novelwriter import CONFIG, SHARED, __date__, __domain__, __version__
|
||||
from novelwriter.common import formatVersion
|
||||
from novelwriter.constants import nwConst
|
||||
|
||||
@@ -111,8 +111,6 @@ class VersionInfoWidget(QWidget):
|
||||
self._lblRelease.setText(self._trLatest.format(reason or self.tr("Failed")))
|
||||
return
|
||||
|
||||
# END Class VersionInfoWidget
|
||||
|
||||
|
||||
class _Retriever(QRunnable):
|
||||
|
||||
@@ -144,10 +142,6 @@ class _Retriever(QRunnable):
|
||||
self.signals.dataReady.emit("", str(e))
|
||||
return
|
||||
|
||||
# END Class _Retriever
|
||||
|
||||
|
||||
class _RetrieverSignal(QObject):
|
||||
dataReady = pyqtSignal(str, str)
|
||||
|
||||
# END Class _RetrieverSignal
|
||||
|
||||
Reference in New Issue
Block a user