Skip to content

Commit d53253d

Browse files
Optimize default sort order for modules with few stars
1 parent 5d695d9 commit d53253d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/check_modules.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ def check_modules():
416416
elif module.get('stars', 0) > 10:
417417
module["defaultSortWeight"] = module["defaultSortWeight"] - 1
418418

419-
# Lower modules with few stars in the default sort order.
420-
# if module.get('stars', 0) < 3:
421-
# module["defaultSortWeight"] += 1
419+
# Modules with few stars shouldn't be too far up in the default sort order. So we give them a minimum value of one.
420+
elif module.get('stars', 0) < 3:
421+
module["defaultSortWeight"] = max(module["defaultSortWeight"], 1)
422422

423423
# Just to reduce imbalance in the default sort order, modules from this developer get a minimum value of one.
424424
if module['maintainer'] == "KristjanESPERANTO":

0 commit comments

Comments
 (0)