diff --git a/kmk/firmware.py b/kmk/firmware.py index c29f5c5..e73ba22 100644 --- a/kmk/firmware.py +++ b/kmk/firmware.py @@ -17,16 +17,21 @@ # First, stuff that has no dependencies, or only C/MPY deps import collections + +import gc + import kmk.consts -import kmk.kmktime -import kmk.types - -# Now stuff that depends on the above (and so on) -import kmk.keycodes -import kmk.matrix - import kmk.hid import kmk.internal_state +# Now stuff that depends on the above (and so on) +import kmk.keycodes +import kmk.kmktime +import kmk.matrix +import kmk.types +from kmk.consts import LeaderMode, UnicodeModes +from kmk.hid import USB_HID +from kmk.internal_state import InternalState +from kmk.matrix import MatrixScanner # GC runs automatically after CircuitPython imports. If we ever go back to # supporting MicroPython, we'll need a GC here (and probably after each @@ -34,12 +39,6 @@ import kmk.internal_state # Thanks for sticking around. Now let's do real work, starting below -import gc -from kmk.consts import LeaderMode, UnicodeModes -from kmk.hid import USB_HID -from kmk.internal_state import InternalState -from kmk.matrix import MatrixScanner - class Firmware: debug_enabled = False diff --git a/kmk/kmktime.py b/kmk/kmktime.py index 1b52a56..39381c8 100644 --- a/kmk/kmktime.py +++ b/kmk/kmktime.py @@ -1,6 +1,6 @@ import math - import time + USE_UTIME = False diff --git a/kmk/macros/simple.py b/kmk/macros/simple.py index 00e9bba..9fb1734 100644 --- a/kmk/macros/simple.py +++ b/kmk/macros/simple.py @@ -1,8 +1,6 @@ import string -from kmk.keycodes import (Keycodes, Macro, RawKeycodes, char_lookup, - lookup_kc_with_cache) -from kmk.kmktime import sleep_ms +from kmk.keycodes import Keycodes, Macro, char_lookup, lookup_kc_with_cache def simple_key_sequence(seq): diff --git a/kmk/macros/unicode.py b/kmk/macros/unicode.py index 345f264..2c5e280 100644 --- a/kmk/macros/unicode.py +++ b/kmk/macros/unicode.py @@ -1,6 +1,7 @@ from kmk.consts import UnicodeModes -from kmk.keycodes import Common, Macro, Modifiers, generate_codepoint_keysym_seq -from kmk.macros.simple import lookup_kc_with_cache, simple_key_sequence +from kmk.keycodes import (Common, Macro, Modifiers, + generate_codepoint_keysym_seq) +from kmk.macros.simple import simple_key_sequence from kmk.types import AttrDict from kmk.util import get_wide_ordinal