mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-10-29 01:26:08 +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:
2 files changed
+6
-1
No files matched your search
+2
-1
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user