Add decorators for determining keyboard and keymap based on current directory (#8191)
* Use pathlib everywhere we can * 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() * add experimental decorators * Create decorators for finding keyboard and keymap based on current directory. Decorators were inspired by @Erovia's brilliant work on the proof of concept.
This commit is contained in:
1 parent
5e98eaaaff
commit
f81b0e35a6
8 files changed
+152
-99
No files matched your search
@@ -65,7 +65,7 @@ def normpath(path):
|
||||
path = Path(path)
|
||||
|
||||
if path.is_absolute():
|
||||
return Path(path)
|
||||
return path
|
||||
|
||||
return Path(os.environ['ORIG_CWD']) / path
|
||||
|
||||
|
||||
Reference in new issue
Block a user