"""Helpful decorators that subcommands can use.
"""
"""Sets `cli.config.<subcommand>.keyboard` based on environment.
This will rewrite cli.config.<subcommand>.keyboard if the user did not pass `--keyboard` and the directory they are currently in is a keyboard or keymap directory.
"""
# Ensure that `--keyboard` was not passed and CWD is under `qmk_firmware/keyboards`
=
=
=
return
return
"""Sets `cli.config.<subcommand>.keymap` based on environment.
This will rewrite cli.config.<subcommand>.keymap if the user did not pass `--keymap` and the directory they are currently in is a keymap, layout, or user directory.
"""
# Ensure that `--keymap` was not passed and that we're under `qmk_firmware`
, =
=
=
return
return
"""Least Recently Used Cache- cache the result of a function.
Args:
timeout
How many seconds to cache results for.
maxsize
The maximum size of the cache in bytes
typed
When `True` argument types will be taken into consideration, for example `3` and `3.0` will be treated as different keys.
"""
=
= +
= +
return
=
=
return
return