-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: code style according PEP8 and endpoints naming #25
base: master
Are you sure you want to change the base?
Conversation
src/test_solution.py
Outdated
}) | ||
response = client.post('/members', json={"first_name": "Tommy", | ||
"id": 3443, | ||
"age": 23, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hchocobar aquí veo que intentaste generar un poco de indentación pero no ha salido bien. Mi sugerencia:
response = client.post('/members', json={
"first_name": "Tommy",
"id": 3443,
"age": 23,
"lucky_numbers": [34,65,23,4,6]
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O como la línea 37, que ha quedado mejor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcogonzalo, el motivo es identación.
Esta es una manera de escribir código en Python según PEP8 (no es la única)
Esta es la documentación: https://peps.python.org/pep-0008/#code-lay-out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sí, pero no está bien alineada de todos modos. Fíjate que hay unas lineas mucho más adentro y no a la misma altura de los anteriores. En el bloque de la Línea 37 sí están alineados, todos, en este bloque no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esa es la idea Marco, alinear a la apertura del curly bracket de json={
Pero no identar a la altrua de client.post(
Corrección en lineas 30 y 31 Se reemplazan tab x espacios, esto soluciona la identación.
Update test_solution.py
@alesanchezr
Buen día!