Skip to content

Always normalize defaults - #983

Merged
mauvilsa merged 1 commit into
mainfrom
default-validation
Sep 21, 2026
Merged

mauvilsa merged 1 commit into
mainfrom
default-validation

Conversation

@mauvilsa

Copy link
Copy Markdown
Owner

What does this PR do?

Before submitting

  • Did you read the contributing guideline?
  • If you used a coding agent, did you fully understand and validate all generated code and ensure it follows the contributing guidelines?
  • Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • If this is a bug fix, did you verify that the tests fail without the code fix?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG including a pull request link? (not for typos, docs, test updates, or minor internal changes/refactors)

@mauvilsa mauvilsa added bug Something isn't working enhancement New feature or request labels Sep 21, 2026
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9273463) to head (edd544e).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #983   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         9162      9168    +6     
=========================================
+ Hits          9162      9168    +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@greptile-apps

greptile-apps Bot commented Sep 21, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule violations were identified.

Summary

This PR makes default normalization consistent across argument registration and set_defaults, while preserving permissive handling of invalid defaults unless strict validation is enabled.

  • Normalizes defaults through the standard type-checking path.
  • Properly restores subcommand parsing context after each parse.
  • Normalizes module objects to import paths outside instantiation.
  • Improves help rendering for enum and callable defaults.
  • Adds regression coverage and updates documentation and changelog entries.

Reviews (1) · Last reviewed commit: "Always normalize defaults"

@sonarqubecloud

Copy link
Copy Markdown

@mauvilsa
mauvilsa merged commit f608c72 into main Sep 21, 2026
33 checks passed
@mauvilsa
mauvilsa deleted the default-validation branch September 21, 2026 04:46

This branch was successfully deployed

1 active deployment
sonarcloud — edd544e6 Deployed Sep 21, 2026 by mauvilsa via sonarcloud #894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant