jenkins-bot submitted this change.
[IMPR] use consecutive reference numbers for autogenerated links
currently free_number gives a randomized next free number for
autogenerated links because set is not ordered. Use a generator
instead.
Change-Id: I1d4489de77496579d77ff0cecf8550779454378b
---
M scripts/reflinks.py
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 2104cca..bb889be 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -350,9 +350,9 @@
with suppress(ValueError):
used_numbers.add(int(number))
- # iterator to give the next free number
- free_number = iter({str(i) for i in range(1, 1000) # should be enough
- if i not in used_numbers})
+ # generator to give the next free number
+ free_number = (str(i) for i in range(1, 1000) # should be enough
+ if i not in used_numbers)
for (g, d) in found_refs.items():
group = ''
To view, visit change 688324. To unsubscribe, or for help writing mail filters, visit settings.