Skip to content

Commit 27dfe29

Browse files
authored
Update component_manager.py
1 parent eea799f commit 27dfe29

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

builder/frameworks/component_manager.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,8 @@ def _has_bt_ble_dependencies(self) -> bool:
131131
lib_deps_str = ' '.join(str(dep) for dep in lib_deps).upper()
132132

133133
bt_ble_keywords = ['BLE', 'BT', 'NIMBLE', 'BLUETOOTH']
134-
135-
for keyword in bt_ble_keywords:
136-
if keyword in lib_deps_str:
137-
return True
138-
139-
return False
134+
135+
return any(keyword in lib_deps_str for keyword in bt_ble_keywords)
140136

141137
except Exception:
142138
return False
@@ -157,12 +153,8 @@ def _is_bt_related_library(self, lib_name: str) -> bool:
157153
'ESP_BLE',
158154
'ESP_BT'
159155
]
160-
161-
for bt_name in bt_related_names:
162-
if bt_name in lib_name_upper:
163-
return True
164-
165-
return False
156+
157+
return any(bt_name in lib_name_upper for bt_name in bt_related_names)
166158

167159
def _get_arduino_core_libraries(self) -> Dict[str, str]:
168160
"""Get all Arduino core libraries and their corresponding include paths."""

0 commit comments

Comments
 (0)