Skip to content

Commit b1c0246

Browse files
committed
fixes type annotations
1 parent 677a600 commit b1c0246

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/artisanlib/canvas.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import functools
3939
from bisect import bisect_right
4040
import psutil
41-
from psutil._common import bytes2human # type:ignore[reportPrivateImportUsage]
41+
from psutil._common import bytes2human # pyright:ignore[reportPrivateImportUsage]
4242

4343
from typing import Final, Optional, List, Set, Dict, Callable, Tuple, Union, Any, Sequence, cast, TYPE_CHECKING #for Python >= 3.9: can remove 'List' since type hints can now use the generic 'list'
4444

@@ -50,7 +50,7 @@
5050
from plus.blend import CustomBlend # pylint: disable=unused-import
5151
from matplotlib.collections import PolyCollection # pylint: disable=unused-import
5252
from matplotlib.axes import Axes # pylint: disable=unused-import
53-
from matplotlib.axes._base import _AxesBase # type:ignore[reportPrivateImportUsage] # pylint: disable=unused-import
53+
from matplotlib.axes._base import _AxesBase # pyright:ignore[reportPrivateImportUsage] # pylint: disable=unused-import
5454
from matplotlib.image import AxesImage # pylint: disable=unused-import
5555
from matplotlib.legend import Legend # pylint: disable=unused-import
5656
from matplotlib.backend_bases import PickEvent, MouseEvent, Event # pylint: disable=unused-import

src/artisanlib/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ def __init__(self, plotCanvas:tgraphcanvas, parent:QWidget, white_icons:bool = F
886886
except Exception: # pylint: disable=broad-except
887887
# not yet monkey patched
888888
formlayout.fedit_org = formlayout.fedit # type: ignore
889-
formlayout.fedit = self.my_fedit # type:ignore[reportPrivateImportUsage]
889+
formlayout.fedit = self.my_fedit # pyright:ignore[reportPrivateImportUsage]
890890
# # monkey patch _formlayout to work around a MPL3.5.1 issue on Qt6
891891
# # (see https://github.com/matplotlib/matplotlib/issues/22471)
892892
# if mpl_version in [[3,5,0], [3,5,1]]:

src/plus/schedule.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ def serialize_roastdate_to_epoch(roastdate: datetime.datetime) -> int: # type:ig
285285
return int(roastdate.timestamp())
286286

287287
@field_serializer('roastUUID', when_used='json')
288-
def serialize_roastUUID_to_str(roastUUID: UUID4) -> str: # type:ignore[misc] # pylint: disable=no-self-argument
289-
return roastUUID.hex
288+
def serialize_roastUUID_to_str(roastUUID: UUID4) -> str: # pylint: disable=no-self-argument
289+
return str(roastUUID.hex)
290290

291291

292292
# updates this CompletedItem with the data given in profile_data

0 commit comments

Comments
 (0)