Skip to content

add -dry-run option to aliases example#3231

Closed
MAHESHKANDELA wants to merge 3 commits intopallets:mainfrom
MAHESHKANDELA:example-aliases-dry-run
Closed

add -dry-run option to aliases example#3231
MAHESHKANDELA wants to merge 3 commits intopallets:mainfrom
MAHESHKANDELA:example-aliases-dry-run

Conversation

@MAHESHKANDELA
Copy link

Summary
• Added a --dry-run flag to the alias command in examples/aliases/aliases.py to preview alias changes without writing the config file.
• Changed config writing to text mode with UTF-8 encoding for correct configparser behavior.

Behavior
• alias ALIAS CMD --config_file writes the alias mapping and prints confirmation.
• alias ALIAS CMD --config_file --dry-run prints what would change and exits without modifying the file.

Tests
• Added tests/test_examples_aliases.py covering write, dry-run no-write, and overwrite behavior.
• python -m pytest -q → 1322 passed, 22 skipped, 1 xfailed

Commits
• 17b8b5f Add dry-run option to aliases example
3b9eb0f Add tests for aliases dry-run behavior

@davidism davidism closed this Feb 25, 2026
@MAHESHKANDELA
Copy link
Author

Hi, thanks for taking a look at this PR.
I noticed it was closed — if there’s any specific feedback or reason it wasn’t aligned with the project direction, I’d really appreciate understanding so I can improve future contributions.

Thanks again!

@davidism
Copy link
Member

Stop using LLMs to generate output at us.

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.

2 participants