def parse_scalar_operation(operation: str) -> '<STR_LIT>':
_operation = operation.strip()<EOL>if not _operation:<EOL><INDENT>raise QueryParserException('<STR_LIT>'.format(operation))<EOL><DEDENT>if '<STR_LIT:|>' in _operation:<EOL><INDENT>raise QueryParserException('<STR_LIT>'<EOL>'<STR_LIT>'.format(operation))<EOL><DEDENT>if '<STR_LIT:..>' in _operation:<EOL><INDENT>raise QueryParserException('<STR_LIT>'<EOL>'<STR_LIT>'.format(operation))<EOL><DEDENT>negation, _operation = parse_negation_operation(_operation)<EOL>op, _operation = parse_comparison_operation(_operation)<EOL>if not op:<EOL><INDENT>op = '<STR_LIT:=>'<EOL><DEDENT>try:<EOL><INDENT>_operation = int(_operation)<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>try:<EOL><INDENT>_operation = float(_operation)<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>raise QueryParserException('<STR_LIT>'<EOL>'<STR_LIT>'.format(operation))<EOL><DEDENT><DEDENT>return QueryOpSpec(op, negation, _operation)<EOL>
Parse scalar operations.

    A scalar operation can one of the following:

     * single value: start_date:12, metric1:>0.9, metric1:>=-0.12
     * negation single value: metric1:~1112, metric1:~<1112 equivalent to metric1:>=1112

    This parser does not allow `|` and `..`.