anitab-org / anitab-org/bridge-in-tech-backend
Improvement: refactor expected_fields_validator
- Lenguaje dominante
- Python
- Estrellas
- 24
- Forks
- 80
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## Description
As a developer,
I need validators to be fast,
so that API response time will be less.
## Mocks
https://github.com/anitab-org/bridge-in-tech-backend/blob/68d8ff9a8640cef1d3e53b2b0dd9b80e3d750fd7/app/utils/validation_utils.py#L157-L164
The two for loops can be implemented efficiently by using the python built-in function.
I think there is no need for `two for` loops for this.
## Acceptance Criteria
### Update [Required]
- [ ] Remove two `for loops`.
- [ ] Use python builtin function to return the actual validation (described in docstrings of function).
## Definition of Done
- [ ] All of the required items are completed.
- [ ] Approval by 1 mentor.
## Estimation
0.5 hours
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.