Format specifiers in f-strings don't highlight the entire thing in a consistent manner
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Empieza reproduciendo los dos ejemplos de f-string en Sublime Text 3.2.1 con MagicPython 1.1.1 e inspecciona sus ámbitos de sintaxis, comparándolos con el ejemplo regular {test:.2f}. Se considera terminado cuando los especificadores de formato de los casos reportados reciben un ámbito coherente, o cuando el comportamiento se documenta como intencionado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hello. Sometimes the :... aspect of a format string is highlighted in its entirety but often times it's not. I would like to know if it's possible to make it so it's all under the same consistent scope or if it's by design that it doesn't. My main use case has to do with types using a custom __format__.
For example:


I would have imagined both of these to fall under the same scope but they're not.
The first screenshot goes source.python > meta.fstring.python > storage.type.format.python
The second screenshot goes source.python > meta.function-call.python > meta.function-call.arguments.python > meta.fstring.python
A regular line of code without using custom __format__ (e.g. {test:.2f}) goes as source.python > meta.function-call.python > meta.function-call.arguments.python > meta.fstring.python > storage.type.format.python which is what I would expect the other two to return as well, unless it's meant to be treated differently.
- Editor name and version: Sublime Text 3.2.1 Build 3207
- Platform: Windows 8.1
- Color scheme: Custom
- MagicPython version: 1.1.1
- A sreenshot: See above
- 5-10 lines of surrounding code: In the screenshot hopefully
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.4k
- Forks
- 98
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 MagicStack/MagicPython
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
MagicStack/MagicPython#275 · 1 reacción ·
-
Support for type parameters Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
MagicStack/MagicPython#273 · 7 reacciones ·
-
Color python properties Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
MagicStack/MagicPython#269 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
MagicStack/MagicPython#267 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
MagicStack/MagicPython#265 · 2 comentarios ·
Todos los issues de MagicStack/MagicPython
Issues similares
-
ai-observability bug team/ai-observability
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AllTheMods/ATM-10-L#19 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SignalK/n2k-signalk#345 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
JuliaPluto/PlutoPlotly.jl#72 ·