Azure / Azure/azure-functions-python-library

Inconsistent naming get_json() in EventGridEvent and EventGridOutputEvent

Abierto
#159 0 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
179
Forks
79
Merge medio
2 d 8 h
PR fusionados (30 d)
2

Descripción

Both mentioned classes have methods called `get_json` which return the classes `__data` field. This seems odd for two reasons:

1. They don't actually return JSON but a dict (if the typing hints in `__init__` are correct). In any case this is a major source of confusion.
2. All other getters are implemented as properties. (So why not just do the same here?)

https://github.com/Azure/azure-functions-python-library/blob/44712a77ce6ba68065d1c16ed6015bb998ddfe48/azure/functions/_eventgrid.py#L33-L34

https://github.com/Azure/azure-functions-python-library/blob/44712a77ce6ba68065d1c16ed6015bb998ddfe48/azure/functions/_eventgrid.py#L86-L87

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Empieza en azure/functions/_eventgrid.py en las líneas 33-34 y 86-87, y luego compara estos accesores con los otros getters de EventGridEvent y EventGridOutputEvent. Resuelve de forma coherente la nomenclatura y el comportamiento de las propiedades, confirmando al mismo tiempo que la API resultante refleja si el valor es un dict en lugar de JSON.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
backend-api-design, cloud
Tipo de issue
Refactorización
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.