myNotebook.py: Make platform check simpler

Mypy does not appear to understand the `x in ...` format for this chech
This commit is contained in:
A_D committed 2022-12-23 17:56:44 +02:00
1 parent 5dd2287e68
commit fa99225b95
1 file changed
+2 -1
+2 -1
View File
@@ -76,7 +76,8 @@ class Label(tk.Label):
"""Custom tk.Label class to fix some display issues."""
def __init__(self, master: Optional[ttk.Frame] = None, **kw):
if sys.platform in ['darwin', 'win32']:
# This format chosen over `sys.platform in (...)` as mypy and friends dont understand that
if sys.platform == 'darwin' or sys.platform == 'win32':
kw['foreground'] = kw.pop('foreground', PAGEFG)
kw['background'] = kw.pop('background', PAGEBG)
else: