Skip to content

fix(batch): allow disabling recursive CLI scans - #327

Merged
LarFii merged 1 commit into
HKUDS:mainfrom
FU-max-boop:fix/batch-cli-no-recursive
Aug 13, 2026
Merged

LarFii merged 1 commit into
HKUDS:mainfrom
FU-max-boop:fix/batch-cli-no-recursive

Conversation

@FU-max-boop

Copy link
Copy Markdown
Contributor

Description

The batch CLI currently defines --recursive with action="store_true" and default=True, so recursive scanning is always enabled. Users cannot restrict a directory input to files directly inside that directory.

This change uses argparse.BooleanOptionalAction to expose --no-recursive while preserving the current recursive default and the existing --recursive option.

Related Issues

N/A — no existing issue or pull request covers this CLI behavior.

Changes Made

  • Add the --no-recursive CLI option without changing the default behavior.
  • Add a regression test that verifies the CLI passes recursive=False to the batch processor.
  • Document non-recursive batch usage.

Checklist

  • Changes tested locally
  • Code reviewed
  • Documentation updated
  • Unit tests added

Tests

  • python -m pytest tests/testbatch_incremental.py -q on Python 3.10, 3.11, and 3.12 — 9 passed on each version
  • pre-commit run --all-files --show-diff-on-failure
  • git diff --check

Additional Notes

This is backward compatible and does not change the library API.

@FU-max-boop
FU-max-boop marked this pull request as ready for review August 11, 2026 02:58
@LarFii
LarFii merged commit 9c57865 into HKUDS:main Aug 13, 2026
4 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.

2 participants