We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sorry for "abusing" the feature request template but there is non that fits bugs related to the library implementation, not the formatter or linter.
$ djlint template.html /home/app/venv/lib/python3.10/site-packages/djlint/settings.py:119: ResourceWarning: unclosed file <_io.BufferedReader name='/app/pyproject.toml'> content = tomllib.load(pyproject_file.open("rb"))
The current way of loading the pyproject.tml file does not properly close the file descriptor. See https://github.com/Riverside-Healthcare/djLint/blob/master/src/djlint/settings.py#L119
Therefore
with open(pyproject_file. "rb") as fp: content = tomllib.load(fp)
should solve the issue and not trigger a warning anymore. I'd be happy to supply a merge request if the solution is accepted.
The text was updated successfully, but these errors were encountered:
Nice catch! Since its a path object, maybe we can do .read_bytes() to keep it inline?
.read_bytes()
Sorry, something went wrong.
5890161
chore(release): 1.19.8 [skip ci]
68c155a
## [1.19.8](v1.19.7...v1.19.8) (2022-12-15) ### Bug Fixes * **attributes:** fixed outer quotes being stripped from attribute values ([dff02dc](dff02dc)), closes [#471](#471) * **settings:** fixed pyproject loader ([5890161](5890161)), closes [#469](#469) * **textarea:** fixed textarea attribute formatting ([e7c904e](e7c904e)), closes [#486](#486)
🎉 This issue has been resolved in version 1.19.8 🎉
The release is available on:
Your semantic-release bot 📦🚀
Awesome. Thanks for the fix!
No branches or pull requests
Sorry for "abusing" the feature request template but there is non that fits bugs related to the library implementation, not the formatter or linter.
Library bug report
The current way of loading the pyproject.tml file does not properly close the file descriptor.
See https://github.com/Riverside-Healthcare/djLint/blob/master/src/djlint/settings.py#L119
Therefore
should solve the issue and not trigger a warning anymore.
I'd be happy to supply a merge request if the solution is accepted.
The text was updated successfully, but these errors were encountered: