From da19b0f8e5e634f10828d4ebedec031f51e1d7ea Mon Sep 17 00:00:00 2001 From: Kyle Sayers Date: Mon, 9 Jun 2025 17:02:14 -0400 Subject: [PATCH] remove iterable check and missing return value Signed-off-by: Kyle Sayers --- src/compressed_tensors/quantization/lifecycle/apply.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/compressed_tensors/quantization/lifecycle/apply.py b/src/compressed_tensors/quantization/lifecycle/apply.py index 566a1963..8bac1a0a 100644 --- a/src/compressed_tensors/quantization/lifecycle/apply.py +++ b/src/compressed_tensors/quantization/lifecycle/apply.py @@ -331,12 +331,10 @@ def find_name_or_class_matches( 3. matches on module names """ targets = sorted(targets, key=lambda x: ("re:" in x, x)) - if isinstance(targets, Iterable): - matches = _find_matches(name, targets) + _find_matches( - module.__class__.__name__, targets, check_contains - ) - matches = [match for match in matches if match is not None] - return matches + matches = _find_matches(name, targets) + _find_matches( + module.__class__.__name__, targets, check_contains + ) + return [match for match in matches if match is not None] def _find_matches(