Skip to content

Conversation

@rambleraptor
Copy link
Contributor

Inspired by #2601

Rationale for this change

Adds pretty-format-toml for formatting toml files

Are these changes tested?

I ran make lint

Are there any user-facing changes?

# 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
#
Copy link
Contributor

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.

Copy link
Contributor

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.

@Fokko
Copy link
Contributor

Fokko commented Oct 17, 2025

I'm unsure if we want to sort the thing. The most important stuff is now all the way at the bottom :/

@kevinjqliu
Copy link
Contributor

thanks for adding this. Lets get #2601 in first, and avoid too many moving parts :)

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.

4 participants