CodeForPhilly / CodeForPhilly/stately

context.events should use dot notation

Aperta
#42 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
api
Lingua principale
Python
Stelle
22
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Ideally we'd be able to do something like this:

``` python
event_names = [event.action.name for event in events]
if 'Approve Taxes' in event_names and 'Approve Parking' in event_names:
change_state('Approved')
```

But currently we have to use:

``` python
event_names = [event['action']['name'] for event in events]
```

Not a huge deal, just easier to write.
Related to #20

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.