-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New CLI option --output-datetime-class #1996 #2100
New CLI option --output-datetime-class #1996 #2100
Conversation
…ateTime, NaiveDateTime, generic datetime koxudaxi#1996
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2100 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 38 38
Lines 4205 4222 +17
Branches 976 979 +3
=========================================
+ Hits 4205 4222 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #2100 will not alter performanceComparing Summary
|
for more information, see https://pre-commit.ci
applying `--output-datetime-class` from koxudaxi#2100 to dataclass to map date, time and date time to the python `datetime` objects instead of strings.
applying `--output-datetime-class` from koxudaxi#2100 to dataclass to map date, time and date time to the python `datetime` objects instead of strings.
applying `--output-datetime-class` from koxudaxi#2100 to dataclass to map date, time and date time to the python `datetime` objects instead of strings.
applying `--output-datetime-class` from koxudaxi#2100 to dataclass to map date, time and date time to the python `datetime` objects instead of strings.
applying `--output-datetime-class` from koxudaxi#2100 to dataclass to map date, time and date time to the python `datetime` objects instead of strings.
Thanks for this PR, finally i can move away from the workaround with the Python API and move back to using the CLI directly. Note that this PR not just introduces an options but also changes the default from |
* Use apply_discriminator_type for dataclasses Allow dataclass models to be properly generated with discriminator field * Fix dataclass inheritance Thanks to keyword only, dataclass models can use inheritance and no have issues with default values * Support datetime types in dataclass fields applying `--output-datetime-class` from #2100 to dataclass to map date, time and date time to the python `datetime` objects instead of strings. * fix unittest * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix unittest * fix unittest --------- Co-authored-by: Koudai Aono <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@meliache |
to choose between AwareDateTime, NaiveDateTime, generic datetime
FIX #1996 and others