summaryrefslogtreecommitdiff
path: root/lib/tartan/palette.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2025-08-21 16:10:48 -0400
committerGitHub <noreply@github.com>2025-08-21 16:10:48 -0400
commite9bcdc910a2101c0da2fa379da36e1d1be2fe3f2 (patch)
tree0e47774b5648ff14cf3b67495ea4f361371031a5 /lib/tartan/palette.py
parenta71ec6e4599e28dfac45d2df3575976dffbb25d6 (diff)
fix type errors (#3928)
* fix type checking error in overriding path propery * fix type hints in sew stack * enable type checking for tartan * ignore type warnings for dynamic wx module attributes * fix tartan type errors * fix circular import * add type-check and test targets * use Optional instead
Diffstat (limited to 'lib/tartan/palette.py')
-rw-r--r--lib/tartan/palette.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tartan/palette.py b/lib/tartan/palette.py
index b8c36331..09dfb373 100644
--- a/lib/tartan/palette.py
+++ b/lib/tartan/palette.py
@@ -64,7 +64,7 @@ class Palette:
stripe = {'render': 1, 'color': '#000000', 'width': '5'}
stripe_panel = cast('StripePanel', stripe_sizer.GetWindow())
stripe['render'] = stripe_panel.visibility.Get3StateValue()
- stripe['color'] = stripe_panel.colorpicker.GetColour().GetAsString(wx.C2S_HTML_SYNTAX)
+ stripe['color'] = stripe_panel.colorpicker.GetColour().GetAsString(wx.C2S_HTML_SYNTAX) # type: ignore[attr-defined]
stripe['width'] = stripe_panel.stripe_width.GetValue()
stripes.append(stripe)
self.palette_stripes[i] = stripes
@@ -173,8 +173,8 @@ class Palette:
try:
# on macOS we need to run wxpython color method inside the app otherwise
# the color picker has issues in some cases to accept our input
- color = wx.Colour(color).GetAsString(wx.C2S_HTML_SYNTAX)
- except wx.PyNoAppError:
+ color = wx.Colour(color).GetAsString(wx.C2S_HTML_SYNTAX) # type: ignore[attr-defined]
+ except wx.PyNoAppError: # type: ignore[attr-defined]
# however when we render an embroidery element we do not want to open wx.App
try:
color = str(Color(color).to_named())