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:
@ -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