Move TypeGuard to TYPE_CHECKING condition

This commit is contained in:
Veronica Berglyd Olsen
2023-08-08 23:14:35 +02:00
parent 5d817ae51f
commit 6e5d991cfe
2 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -27,7 +27,7 @@ from __future__ import annotations
import random
import logging
from typing import ItemsView, Iterator, KeysView, Literal, TypeGuard, ValuesView
from typing import TYPE_CHECKING, ItemsView, Iterator, KeysView, Literal, ValuesView
from PyQt5.QtGui import QIcon, QPainter, QPainterPath, QPixmap, QColor
from PyQt5.QtCore import QRectF, Qt
@@ -35,6 +35,9 @@ from PyQt5.QtCore import QRectF, Qt
from novelwriter import CONFIG
from novelwriter.common import minmax, simplified
if TYPE_CHECKING: # pragma: no cover
from typing import TypeGuard # Requires Python 3.10
logger = logging.getLogger(__name__)