Update linting for main code
This commit is contained in:
@@ -20,7 +20,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
@@ -38,6 +38,14 @@ SPLASH_IMG = Path(__file__).parent / "assets" / "images" / "splash.png"
|
||||
|
||||
|
||||
class NSplashScreen(QSplashScreen):
|
||||
"""GUI: App Launch Splash Screen.
|
||||
|
||||
A small splash screen that is shown as novelWriter starts up. Its
|
||||
primary purpose is to provide user feedback that the app is being
|
||||
initiated when there are delays in the process while Qt waits for
|
||||
responses from the OS, or has to load particularly large data sets
|
||||
like when the system has a lot of fonts installed.
|
||||
"""
|
||||
|
||||
__slots__ = ("_color", "_rect", "_text")
|
||||
|
||||
@@ -52,17 +60,14 @@ class NSplashScreen(QSplashScreen):
|
||||
self._color = QColor(26, 52, 78)
|
||||
self._rect = QRect(144, 110, 440, 30)
|
||||
self._text = ""
|
||||
return
|
||||
|
||||
def __del__(self) -> None: # pragma: no cover
|
||||
logger.debug("Delete: NSplashScreen")
|
||||
return
|
||||
|
||||
def drawContents(self, painter: QPainter) -> None:
|
||||
"""Draw the text message."""
|
||||
painter.setPen(self._color)
|
||||
painter.drawText(self._rect, Qt.AlignmentFlag.AlignLeft, self._text)
|
||||
return
|
||||
|
||||
def showStatus(self, message: str) -> None:
|
||||
"""Update the status message."""
|
||||
@@ -71,4 +76,3 @@ class NSplashScreen(QSplashScreen):
|
||||
if message:
|
||||
logger.info("[Splash] %s", message)
|
||||
sleep(0.025)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user