Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hchocobar
Copy link

@alesanchezr
Buen día!

  1. Propongo cambios en los archivos .py para adecuarlos a las PEP8 (identación de listas, dos lineas en blancos entre funciones)
  2. Propongo realizar los endpoints en plural, para adecuarlos a la norma de nombres para endpoints.
  3. Cambié el preview.png para adecuarlo a estos cambios.

})
response = client.post('/members', json={"first_name": "Tommy",
"id": 3443,
"age": 23,

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]
    })

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.

Copy link
Author

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
imagen

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.

Copy link
Author

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.
@marcogonzalo marcogonzalo self-requested a review April 11, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants