diff options
| author | capellancitizen <thecapellancitizen@gmail.com> | 2025-03-09 21:21:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-09 21:21:48 -0400 |
| commit | 99509df8d8abf1e7b701a4a09cf170a362f6d878 (patch) | |
| tree | a461549502fa9f37dc287789b6c7db81dfcd5368 /lib/tartan/palette.py | |
| parent | 0d2fc24f25f87562f0755b53dad6204efad1330d (diff) | |
Mypy type correctness (#3199)
Diffstat (limited to 'lib/tartan/palette.py')
| -rw-r--r-- | lib/tartan/palette.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/tartan/palette.py b/lib/tartan/palette.py index d945eb83..25bd2100 100644 --- a/lib/tartan/palette.py +++ b/lib/tartan/palette.py @@ -5,12 +5,14 @@ # Additional credits to: https://github.com/clsn/pyTartan import re -from typing import List +from typing import TYPE_CHECKING, List, cast import wx from inkex import Color from .colors import string_to_color +if TYPE_CHECKING: + from ..gui.tartan.stripe_panel import StripePanel class Palette: @@ -59,7 +61,7 @@ class Palette: stripes = [] for stripe_sizer in outer_sizer.Children: stripe = {'render': 1, 'color': '#000000', 'width': '5'} - stripe_panel = stripe_sizer.GetWindow() + 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['width'] = stripe_panel.stripe_width.GetValue() |
