From c66930445f7d5941eb847568288046d51f853786 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Mon, 17 Feb 2020 11:42:11 -0800 Subject: Use pathlib everywhere we can (#7872) * Use pathlib everywhere we can * Update lib/python/qmk/path.py Co-Authored-By: Erovia * Update lib/python/qmk/path.py Co-Authored-By: Erovia * Improvements based on @erovia's feedback * rework qmk compile and qmk flash to use pathlib * style * Remove the subcommand_name argument from find_keyboard_keymap() Co-authored-by: Erovia --- lib/python/qmk/constants.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/python/qmk/constants.py (limited to 'lib/python/qmk/constants.py') diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py new file mode 100644 index 0000000000..3e4709969d --- /dev/null +++ b/lib/python/qmk/constants.py @@ -0,0 +1,9 @@ +"""Information that should be available to the python library. +""" +from pathlib import Path + +# The root of the qmk_firmware tree. +QMK_FIRMWARE = Path.cwd() + +# This is the number of directories under `qmk_firmware/keyboards` that will be traversed. This is currently a limitation of our make system. +MAX_KEYBOARD_SUBFOLDERS = 5 -- cgit v1.2.3