Skip to content

Commit 3ba4a4b

Browse files
authored
Merge pull request #1282 from VisLab/fix_extras
Addressed copilot review
2 parents 42d97f9 + de5c509 commit 3ba4a4b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

hed/models/query_service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def get_query_handlers(
4444
try:
4545
expression_parsers[index] = QueryHandler(query)
4646
except Exception as e:
47-
issues.append(f"[BadQuery {index}]: {query} cannot be parsed: {e}")
47+
detail = " ".join(str(e).split())
48+
issues.append(f"[BadQuery {index}]: {query} cannot be parsed: {detail}")
4849
return expression_parsers, query_names, issues
4950

5051

hed/models/query_util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Token:
9494
ExactMatch = 11
9595
ExactMatchEnd = 12
9696
ExactMatchOptional = 14
97-
NotInLine = 13 # The @tag prefix operator, indicating tag must NOT be in matched line.
97+
NotInLine = 13 # Reserved constant. The @tag prefix is handled in Expression.__init__, not as a token kind.
9898

9999
def __init__(self, text):
100100
"""Initialize a token for query parsing.
@@ -117,7 +117,6 @@ def __init__(self, text):
117117
"{": Token.ExactMatch, # Nothing else
118118
"}": Token.ExactMatchEnd, # Nothing else
119119
":": Token.ExactMatchOptional,
120-
"@": Token.NotInLine,
121120
}
122121
self.kind = tokens.get(text, Token.Tag)
123122
self.text = text

0 commit comments

Comments
 (0)