Enable some ruff checks for performance and readability (#39383)
* Fix inefficient sequence tests Signed-off-by: cyy <cyyever@outlook.com> * Enable PERF102 Signed-off-by: cyy <cyyever@outlook.com> * Enable PLC1802 Signed-off-by: cyy <cyyever@outlook.com> * Enable PLC0208 Signed-off-by: cyy <cyyever@outlook.com> --------- Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
@@ -757,7 +757,7 @@ class PeftIntegrationTester(unittest.TestCase, PeftTesterMixin):
|
||||
model.load_adapter(tmpdirname, is_trainable=True)
|
||||
|
||||
for name, module in model.named_modules():
|
||||
if len(list(module.children())):
|
||||
if list(module.children()):
|
||||
# only check leaf modules
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user