Skip to content

Add --output-date-class option and date-time-local format support#2739

Merged
koxudaxi merged 2 commits intomainfrom
feature/datetime-date-class-options
Dec 22, 2025
Merged

Add --output-date-class option and date-time-local format support#2739
koxudaxi merged 2 commits intomainfrom
feature/datetime-date-class-options

Conversation

@koxudaxi
Copy link
Copy Markdown
Owner

Fixes: #2448
Fixes: #2593

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 22, 2025

Warning

Rate limit exceeded

@koxudaxi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 253bd7c and 26fcff5.

📒 Files selected for processing (26)
  • docs/cli-reference/index.md
  • docs/cli-reference/quick-reference.md
  • docs/cli-reference/typing-customization.md
  • src/datamodel_code_generator/__init__.py
  • src/datamodel_code_generator/__main__.py
  • src/datamodel_code_generator/arguments.py
  • src/datamodel_code_generator/cli_options.py
  • src/datamodel_code_generator/format.py
  • src/datamodel_code_generator/model/dataclass.py
  • src/datamodel_code_generator/model/msgspec.py
  • src/datamodel_code_generator/model/pydantic/types.py
  • src/datamodel_code_generator/model/pydantic_v2/imports.py
  • src/datamodel_code_generator/model/pydantic_v2/types.py
  • src/datamodel_code_generator/model/types.py
  • src/datamodel_code_generator/parser/base.py
  • src/datamodel_code_generator/parser/graphql.py
  • src/datamodel_code_generator/parser/jsonschema.py
  • src/datamodel_code_generator/parser/openapi.py
  • src/datamodel_code_generator/types.py
  • tests/data/expected/main/openapi/date_class_future_date.py
  • tests/data/expected/main/openapi/date_class_past_date.py
  • tests/data/expected/main/openapi/datetime_pydantic_v2_future_datetime.py
  • tests/data/expected/main/openapi/datetime_pydantic_v2_past_datetime.py
  • tests/data/openapi/date_class.yaml
  • tests/data/openapi/datetime_local.yaml
  • tests/main/openapi/test_main_openapi.py
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/datetime-date-class-options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

🤖 Generated by GitHub Actions
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.36%. Comparing base (2b4af3e) to head (26fcff5).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2739   +/-   ##
=======================================
  Coverage   99.36%   99.36%           
=======================================
  Files          83       83           
  Lines       12123    12199   +76     
  Branches     1458     1463    +5     
=======================================
+ Hits        12046    12122   +76     
  Misses         45       45           
  Partials       32       32           
Flag Coverage Δ
unittests 99.36% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Dec 22, 2025

CodSpeed Performance Report

Merging #2739 will not alter performance

Comparing feature/datetime-date-class-options (26fcff5) with main (253bd7c)

Summary

✅ 71 untouched
⏩ 10 skipped1

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@koxudaxi koxudaxi merged commit bad42b3 into main Dec 22, 2025
38 checks passed
@koxudaxi koxudaxi deleted the feature/datetime-date-class-options branch December 22, 2025 15:44
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.

allow datetimes both with and without timezones in the same schema Support PastDatetime

1 participant