aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/search.py
diff options
context:
space:
mode:
authorSergey Vlasov <[email protected]>2024-09-13 23:52:31 +0300
committerGitHub <[email protected]>2024-09-14 06:52:31 +1000
commit0b3ece1189b11e36790c99a1a80f75413b826bb4 (patch)
tree464b4e70e0368ccc7e5c7331f38b8f0f2c9a23ec /lib/python/qmk/search.py
parentae4ab5ed31360cbb327436ae7e76d1d0cef59449 (diff)
downloadqmk_firmware-0b3ece1189b11e36790c99a1a80f75413b826bb4.tar.gz
qmk_firmware-0b3ece1189b11e36790c99a1a80f75413b826bb4.zip
`qmk find`: Fix handling of keys with dots in filter functions (#24393)
Diffstat (limited to 'lib/python/qmk/search.py')
-rw-r--r--lib/python/qmk/search.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/python/qmk/search.py b/lib/python/qmk/search.py
index baaf11eb34..25e3d92066 100644
--- a/lib/python/qmk/search.py
+++ b/lib/python/qmk/search.py
@@ -74,28 +74,30 @@ class Exists(FilterFunction):
func_name = "exists"
def apply(self, target_info: KeyboardKeymapDesc) -> bool:
- return self.key in target_info.data
+ return self.key in target_info.dotty
class Absent(FilterFunction):
func_name = "absent"
def apply(self, target_info: KeyboardKeymapDesc) -> bool:
- return self.key not in target_info.data
+ return self.key not in target_info.dotty
class Length(FilterFunction):
func_name = "length"
def apply(self, target_info: KeyboardKeymapDesc) -> bool:
- return (self.key in target_info.data and len(target_info.data[self.key]) == int(self.value))
+ info_dotty = target_info.dotty
+ return (self.key in info_dotty and len(info_dotty[self.key]) == int(self.value))
class Contains(FilterFunction):
func_name = "contains"
def apply(self, target_info: KeyboardKeymapDesc) -> bool:
- return (self.key in target_info.data and self.value in target_info.data[self.key])
+ info_dotty = target_info.dotty
+ return (self.key in info_dotty and self.value in info_dotty[self.key])
def _get_filter_class(func_name: str, key: str, value: str) -> Optional[FilterFunction]: