Skip to content

Commit c95b259

Browse files
roed314claude
andcommitted
Correct a comment about where the --3 spelling comes from
prep_ranges no longer folds a leading .. into a dash, so --3 now reaches LIST_RE only when a user types it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 919fd98 commit c95b259

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lmfdb/utils/search_parsing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
UNSIGNED_INT_STR = r"\d+"
2626
SIGNED_INT_STR = r"-?\d+"
2727
# A singleton or a range with a lower endpoint (5, -5, -5-3, -5--3, -5-), a
28-
# range with the lower endpoint omitted (..3, ..-3), or the same with .. already
29-
# folded into - by prep_ranges (--3). Note that -3 is the singleton -3.
28+
# range with the lower endpoint omitted (..3, ..-3), or that same range with a
29+
# dash for the omitted endpoint (--3). Note that -3 is the singleton -3.
3030
INT_ITEM_STR = r"(?:{s}(?:{sep}(?:{s})?)?|--{u}|\.\.{s})".format(
3131
s=SIGNED_INT_STR, sep=RANGE_SEP_STR, u=UNSIGNED_INT_STR)
3232
LIST_RE = re.compile(r"^{0}(?:,{0})*$".format(INT_ITEM_STR))

0 commit comments

Comments
 (0)