Skip to content

Conversation

@hopkeinst
Copy link

#38

#38 (comment)

Se corre pre-commit y hacen cambios mencionados por @ivansaul en #38 (comment)

coco.py Outdated

if helpers.is_course_url(url):
with Client(headless=headless) as client:
lst_errors_url = []
Copy link
Owner

@ivansaul ivansaul May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

El nombre lst_errors_url no es muy descriptivo. ¿Podrías considerar cambiarlo a list_of_errors o errors_list?

coco.py Outdated
except VideoError:
tprint("✗ Unable to fetch the video details.")
message = f"[SECTION] {section_title} [VIDEO] {video_url}"
message = f"[SECTION] {section_title} [VIDEO] {video_url.url}"
Copy link
Owner

@ivansaul ivansaul May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La variable video_url es de tipo String, por lo que no tiene la propiedad url. Debería ser simplemente {video_url}

coco.py Outdated

if len(lst_errors_url) > 0:
tprint("[bold red]URLs with ERROR[/bold red]")
for leu in lst_errors_url:
Copy link
Owner

@ivansaul ivansaul May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La variable leu podría cambiarse a solo error para ser más descriptivo.

@ivansaul
Copy link
Owner

Hola, @hopkeinst.

Gracias por tomarte tu tiempo en contribuir con este proyecto. Solo tengo un par de observaciones no tan relevantes, pero que ayudarían a mejorar la claridad y legibilidad del código:

  • En la línea lst_errors_url, el nombre de la variable no es muy descriptivo. Podrías considerar cambiarlo por ejemplo a list_of_errors o errors_list.

  • En la línea donde usas video_url.url, recuerda que video_url es de tipo String y no tiene la propiedad url. Debería ser simplemente {video_url}.

  • En el bucle for leu in lst_errors_url:, el nombre leu podría cambiarse a error para ser más descriptivo.

Gracias de nuevo por tu trabajo en este proyecto. Si tienes alguna pregunta, sugerencia o mejora puedes escribirme por Discord o por este medio.

Saludos,

Bugs: \n 1. Change video_url.url to video_url (this is string no object) \n 2. Rename variables for easy understanding
@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@hopkeinst
Copy link
Author

Hola @ivansaul

Listo

Primero que todo, me disculpo por lo del objeto en lugar del string (video_url -> video_url.url) se me pasó por andar trabajando en otra rama (no me dió tiempo para probar y solo hice el cambio y revisé el código por encima y que estuviera todo bien).

También los cambios en los nombres de las variables.

Probado y funcional 🆗

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