Skip to content

Fixed action=append to exclude default(s) - #176

Merged
dskrypa merged 3 commits into
mainfrom
dev
Jul 4, 2026
Merged

Fixed action=append to exclude default(s)#176
dskrypa merged 3 commits into
mainfrom
dev

Conversation

@dskrypa

@dskrypa dskrypa commented Jul 4, 2026

Copy link
Copy Markdown
Owner

This PR fixes action='append' to exclude default(s), and adds action='append_default' for use cases that require the previous behavior.

This is technically a minor breaking change. The previous behavior was frequently considered to be surprising behavior, it often caused subtle bugs, and it resulted in many less than ideal workarounds.

For any use cases where nargs='+' or similar and the inclusion of default value(s) is desired when explicit arguments are provided, action='append_default' needs to be explicitly specified for the relevant parameter(s).

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.89%. Comparing base (8f06787) to head (473e010).

Files with missing lines Patch % Lines
lib/cli_command_parser/parameters/actions.py 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #176   +/-   ##
=======================================
  Coverage   96.89%   96.89%           
=======================================
  Files          54       54           
  Lines        7085     7089    +4     
  Branches     1138     1138           
=======================================
+ Hits         6865     6869    +4     
- Misses        152      153    +1     
+ Partials       68       67    -1     
Flag Coverage Δ
unittests 96.88% <92.59%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dskrypa
dskrypa merged commit 7025269 into main Jul 4, 2026
10 checks passed
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.

1 participant