Merged
Conversation
…在更广泛域名的前面,避免优先级倒置(ds配置以在前面的为准)
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces JSON object sorting functionality and migrates the project to use uv for dependency management to address issue #31. The implementation adds a recursive sorting function that orders JSON keys by length (descending) then alphabetically, ensuring consistent formatting across configuration files.
Key changes:
- Added
sort_json_object()utility function to recursively sort JSON dictionaries by key length and name - Migrated dependency management to
uvwith newpyproject.tomlanduv.lockfiles - Applied JSON sorting to configuration save operations in
Config.save()and final config generation inmain()
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/utils.py |
Added sort_json_object() function to recursively sort dictionaries by key length (desc) then alphabetically |
src/Config.py |
Updated save() method to sort configuration before writing to file |
src/main.py |
Applied sorting to final config output; translated TODO comment from English to Chinese |
assets/final_config.json |
Regenerated with sorted keys according to new sorting convention |
pyproject.toml |
New project metadata file specifying Python >=3.14 and dependencies |
uv.lock |
New dependency lock file generated by uv for Python 3.14 |
requirements.txt |
Regenerated by uv with package hashes and dependency tree |
.python-version |
New file specifying Python 3.14 |
main.py |
New root-level placeholder main file (appears to be auto-generated scaffolding) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix issue #31