1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 01:22:19 +03:00

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 2022-12-23 17:56:44 +02:00
parent 5dd2287e68
commit fa99225b95
No known key found for this signature in database
GPG Key ID: 4BE9EB7DF45076C4

@ -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: