Azure / Azure/azure-functions-python-library
Inconsistent naming get_json() in EventGridEvent and EventGridOutputEvent
- Lingua principale
- Python
- Stelle
- 179
- Fork
- 79
- Merge medio
- 2g 8h
- PR unite (30g)
- 2
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia in azure/functions/_eventgrid.py alle righe 33-34 e 86-87, quindi confronta questi accessor con gli altri getter di EventGridEvent e EventGridOutputEvent. Risolvi in modo coerente la denominazione e il comportamento delle proprietà, verificando al contempo che l’API risultante rifletta se il valore è un dict anziché JSON.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend-api-design, cloud
- Tipo di issue
- Refactoring
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100