mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 23:37:14 +03:00
hotkey: add sys.platform guards to all files
This both makes mypy happy and ensures that the wrong file is not imported in the wrong place
This commit is contained in:
parent
4527177f9b
commit
ca915782f6
@ -3,6 +3,7 @@ import pathlib
|
||||
import sys
|
||||
import tkinter as tk
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
assert sys.platform == 'darwin'
|
||||
|
||||
import objc
|
||||
from AppKit import (
|
||||
@ -36,7 +37,7 @@ class MacHotkeyMgr(AbstractHotkeyMgr):
|
||||
|
||||
def __init__(self):
|
||||
self.MODIFIERMASK = NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask \
|
||||
| NSNumericPadKeyMask
|
||||
| NSNumericPadKeyMask
|
||||
self.root: tk.Tk
|
||||
|
||||
self.keycode = 0
|
||||
|
@ -1,7 +1,11 @@
|
||||
"""Linux implementation of hotkey.AbstractHotkeyMgr."""
|
||||
import sys
|
||||
|
||||
from EDMCLogging import get_main_logger
|
||||
from hotkey import AbstractHotkeyMgr
|
||||
|
||||
assert sys.platform == 'linux'
|
||||
|
||||
logger = get_main_logger()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user