fdemmer / django-weasyprint

A Django class-based view generating PDF resposes using WeasyPrint
Other
344 stars 53 forks source link

Fix pre-commit / ruff errors #82

Closed dekkers closed 6 months ago

dekkers commented 7 months ago

I saw that the repository wasn't clean with regards to pre-commit / ruff. This PR fixes all the ruff errors.

I decided to silence the PTH123 error because Django returns strings and it doesn't make a lot of sense to me to convert the string to a Path object for a single open call just to make ruff happy.

It might also be a good idea to add https://pre-commit.ci/ to the repository to have pre-commit run in CI.

semanticdiff-com[bot] commented 7 months ago

Review changes with SemanticDiff.

Analyzed 4 of 4 files.

Overall, the semantic diff is 50% smaller than the GitHub diff.

2 files do not contain logic changes. Filename Status
:heavy_check_mark: django_weasyprint/__init__.py 38.7% smaller
:heavy_check_mark: django_weasyprint/tests/__init__.py No logic changes found
:heavy_check_mark: django_weasyprint/utils.py 12.5% smaller
:heavy_check_mark: django_weasyprint/views.py No logic changes found