Lexer gives quoted identifiers an `end` that is the token length, not its end offset
@chiliec ya está trabajando en esto.
Desde el 12/10/2026.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 20/100
Línea de trabajo
Read jmespath/lexer.py around line 185 and inspect _consume_quoted_identifier; the issue includes a reproducing expression and the incorrect token fields. Check the existing lexer tests for position assertions, then verify the quoted identifier's end is its end offset in foo."q".
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
While testing an experimental version of Perch, we found the following and figured it was worth a report.
_consume_quoted_identifier sets the token's end to the token's length instead of start + length, so it's wrong whenever the identifier isn't at the start of the expression:
>>> from jmespath.lexer import Lexer
>>> [t for t in Lexer().tokenize('foo."q"') if t['type'] == 'quoted_identifier']
[{'type': 'quoted_identifier', 'value': 'q', 'start': 4, 'end': 2}]
end is 2, which is before start. Every other token type uses start + len(...). Search results aren't affected; only the position information is wrong.
It's at jmespath/lexer.py:185:
return {'type': 'quoted_identifier', 'value': loads(lexeme),
'start': start, 'end': token_len}
'end': start + token_len would fix it. The lexer rewrite in #362 keeps the same line.
Tested on develop (2812594), Python 3.14.6, macOS 26.2.
- Lenguaje dominante
- Python
- Estrellas
- 2.5k
- Forks
- 231
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de jmespath/jmespath.py
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
jmespath/jmespath.py#401 ·
-
floor() and ceil() raise OverflowError / ValueError on Infinity and NaNPosiblemente ocupada @guocn la tomó hace 49 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jmespath/jmespath.py#381 ·
-
sdist is missing `tests/__init__.py`Posiblemente ocupada @deepakganesh78 la tomó hace 127 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
jmespath/jmespath.py#341 · 1 comentario ·
-
Different behavior on merge function between the JS lib and the Python libQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
jmespath/jmespath.py#329 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
jmespath/jmespath.py#328 · 1 comentario · 1 reacción ·
Todos los issues de jmespath/jmespath.py
Issues similares
-
test_real_pandoc_failure_is_one_path_free_line fails on macOS CI with current Homebrew pandocAbiertobug TAG: unit tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
learningequality/ricecooker#898 ·
-
task
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
freelawproject/litigant-portal#1285 ·
Los mantenedores suelen responder en 2 días
-
least_squares returns a nonfinite objective for an invalid initial residualPosiblemente ocupada @sylvesterkaczmarek la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
google-deepmind/mujoco#4023 ·
Los mantenedores suelen responder en 11 días
-
Five Australian birds: Red-capped Parrot, Red-winged Fairywren, Gilbert’s Honeyeater, Western Spinebill, Western WattlebirdPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
arnegiacomo/fugleramme#427 ·
Los mantenedores suelen responder en 1 día
-
MONDO's zebu and cat Arnold-Chiari terms are is_a a dog disease (monarch-initiative/mondo#10939)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NCATSTranslator/Babel#1317 ·
Los mantenedores suelen responder en 2 días