Skip to content

fix(requests): apply --end-date when --start-date is omitted - #176

Open
pcbeingused33 wants to merge 1 commit into
deepgram:mainfrom
pcbeingused33:fix/requests-end-date-without-start
Open

pcbeingused33 wants to merge 1 commit into
deepgram:mainfrom
pcbeingused33:fix/requests-end-date-without-start

Conversation

@pcbeingused33

Copy link
Copy Markdown

Summary

dg requests --end-date 2025-11-01 silently ignored the end date unless --start-date was also given.

In _list_requests, --end-date was only parsed inside the elif start_date: branch, so on its own it reached the client as end=None and the history was not filtered. DeepgramClient.list_requests already supports sending end without start.

Changes

  • Parse --end-date when either date option is given; start stays unset if --start-date is omitted.
  • Behaviour with --start-date only, with both dates, and with --last-week / --last-day is unchanged.
  • Add a regression test.

Test plan

  • make check passes (format, lint, typecheck)
  • make dev passes (format, lint, tests)
  • Manual testing of affected commands

pytest packages/deepctl-cmd-requests/tests: the new regression test fails without the fix and all 16 tests pass with it. It uses a mocked client; no live API call was made.

Related issues

None.

AI assistance (Claude Code) was used to prepare this change.

This branch has not been deployed

No deployments
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