-
Notifications
You must be signed in to change notification settings - Fork 388
Add pretty-format-toml #2605
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
base: main
Are you sure you want to change the base?
Add pretty-format-toml #2605
Conversation
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # |
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.
pretty-format-toml is linting the license header. I believe this may breaks the release process with the license check. Their documentation mentions an issue with comment preservation. I wonder if there is a way to ignore this. or we can try another lib like taplo.
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.
I've did a check and it seems that it is fine with the format change:
➜ iceberg-python git:(pretty-format-toml) ./dev/check-license
ERROR: Ignored 0 lines in your exclusion files as comments or empty lines.
Could not find Apache license headers in the following files:
!????? /Users/fokko.driesprong/work/iceberg-python/coverage.xml
!????? /Users/fokko.driesprong/work/iceberg-python/.idea/iceberg-python.iml
!????? /Users/fokko.driesprong/work/iceberg-python/.idea/misc.xml
!????? /Users/fokko.driesprong/work/iceberg-python/.idea/modules.xml
!????? /Users/fokko.driesprong/work/iceberg-python/.idea/vcs.xml
!????? /Users/fokko.driesprong/work/iceberg-python/.idea/workspace.xml
!????? /Users/fokko.driesprong/work/iceberg-python/.idea/inspectionProfiles/profiles_settings.xml
!????? /Users/fokko.driesprong/work/iceberg-python/.mypy_cache/CACHEDIR.TAG
!????? /Users/fokko.driesprong/work/iceberg-python/.pytest_cache/CACHEDIR.TAG
!????? /Users/fokko.driesprong/work/iceberg-python/.pytest_cache/README.md
!????? /Users/fokko.driesprong/work/iceberg-python/.pytest_cache/v/cache/lastfailed
!????? /Users/fokko.driesprong/work/iceberg-python/.pytest_cache/v/cache/nodeids
!????? /Users/fokko.driesprong/work/iceberg-python/.pytest_cache/v/cache/stepwise
!????? /Users/fokko.driesprong/work/iceberg-python/.ruff_cache/CACHEDIR.TAG
!????? /Users/fokko.driesprong/work/iceberg-python/htmlcov/class_index.html
!????? /Users/fokko.driesprong/work/iceberg-python/htmlcov/function_index.html
!????? /Users/fokko.driesprong/work/iceberg-python/htmlcov/index.html
!????? /Users/fokko.driesprong/work/iceberg-python/pyiceberg/avro/decoder_fast.c
The checker is pretty flexible when it comes to whitespace.
|
I'm unsure if we want to sort the thing. The most important stuff is now all the way at the bottom :/ |
|
thanks for adding this. Lets get #2601 in first, and avoid too many moving parts :) |
|
@kevinjqliu Let's get #2704 in first as well to avoid having all the exclusions to the top of the file 👍 |
Inspired by #2601
Rationale for this change
Adds
pretty-format-tomlfor formatting toml filesAre these changes tested?
I ran
make lintAre there any user-facing changes?