Merge branch 'dev' into fix/adaptive-autosave-indexerror

This commit is contained in:
Karim shoair
2026-06-07 15:53:47 +03:00
committed by GitHub
20 changed files with 80 additions and 124 deletions
+3 -1
View File
@@ -991,7 +991,9 @@ class Selector(SelectorsGeneration):
SequenceMatcher(None, v, candidate_attributes.get(k, "")).ratio()
for k, v in original_attributes.items()
)
checks += len(candidate_attributes)
# Using `max` so candidates with extra attributes are penalized and candidates
# with fewer attributes don't get inflated scores from a smaller denominator
checks += max(len(original_attributes), len(candidate_attributes))
else:
if not candidate_attributes:
# Both don't have attributes, this must mean something