Skip to content

Conversation

@ICEPower420
Copy link

Resolves feature: adding parameter to @DataClass() #2357
Added argument dataclass_arguments takes precedence over --keyword-only and --frozen-dataclasses

ICEPower420 and others added 2 commits June 30, 2025 21:27
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 2, 2025

CodSpeed Performance Report

Merging #2437 will not alter performance

Comparing ICEPower420:main (822937d) with main (82a9295)

Summary

✅ 32 untouched

@gaborbernat gaborbernat marked this pull request as draft July 2, 2025 18:32
Copy link
Collaborator

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing sadly.

@ICEPower420 ICEPower420 marked this pull request as ready for review July 12, 2025 16:29
@ICEPower420 ICEPower420 requested a review from gaborbernat July 12, 2025 16:29
ICEPower420 and others added 3 commits July 12, 2025 18:41
Co-authored-by: Khaled Radmal <khaled>
* fix ci

* added # noqa: UP045

---------

Co-authored-by: Khaled Radmal <khaled>
@codecov
Copy link

codecov bot commented Jul 14, 2025

Codecov Report

❌ Patch coverage is 91.42857% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.62%. Comparing base (82a9295) to head (822937d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/datamodel_code_generator/parser/graphql.py 75.00% 0 Missing and 3 partials ⚠️
src/datamodel_code_generator/parser/jsonschema.py 75.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2437      +/-   ##
==========================================
- Coverage   97.67%   97.62%   -0.06%     
==========================================
  Files          67       67              
  Lines        8128     8195      +67     
  Branches      854      863       +9     
==========================================
+ Hits         7939     8000      +61     
  Misses        144      144              
- Partials       45       51       +6     
Flag Coverage Δ
unittests 97.62% <91.42%> (-0.06%) ⬇️

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.

Copy link
Collaborator

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to fix the readme failure:

diff --git a/README.md b/README.md
index e7d4b968..5347439b 100644
--- a/README.md
+++ b/README.md
@@ -495,7 +495,7 @@ Template customization:
                         A file with kwargs for custom formatters.
   --custom-template-dir CUSTOM_TEMPLATE_DIR
                         Custom template directory
-  --encoding ENCODING   The encoding of input and output (default: cp1252)
+  --encoding ENCODING   The encoding of input and output (default: utf-8)
   --extra-template-data EXTRA_TEMPLATE_DATA
                         Extra template data
   --use-double-quotes   Model generated with double quotes. Single quotes or your black
diff --git a/docs/index.md b/docs/index.md
index 0cc303ab..478dd24a 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -487,7 +487,7 @@ Template customization:
                         A file with kwargs for custom formatters.
   --custom-template-dir CUSTOM_TEMPLATE_DIR
                         Custom template directory
-  --encoding ENCODING   The encoding of input and output (default: cp1252)
+  --encoding ENCODING   The encoding of input and output (default: utf-8)
   --extra-template-data EXTRA_TEMPLATE_DATA
                         Extra template data
   --use-double-quotes   Model generated with double quotes. Single quotes or your black

Otherwise looks good.

@gaborbernat gaborbernat marked this pull request as draft July 25, 2025 14:09
@ICEPower420 ICEPower420 marked this pull request as ready for review July 25, 2025 19:53
@gaborbernat gaborbernat enabled auto-merge (squash) July 25, 2025 20:41
A file with kwargs for custom formatters.
--custom-template-dir CUSTOM_TEMPLATE_DIR
Custom template directory
--encoding ENCODING The encoding of input and output (default: utf-8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this line has changed? I can't find any edit related to default file encoding

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the CI is breaking because of this, my guess is that the readme generator behaves differently on Windows and UNIX, and the PR creator ran it on Windows causing this change.

Copy link
Contributor

@ilovelinux ilovelinux Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OT: I wonder if we should set a default encoding instead of relying on the system default/

Or we could specify that it's the SYSTEM default (and it's not enforced by the tool)

A file with kwargs for custom formatters.
--custom-template-dir CUSTOM_TEMPLATE_DIR
Custom template directory
--encoding ENCODING The encoding of input and output (default: utf-8)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the CI is breaking because of this, my guess is that the readme generator behaves differently on Windows and UNIX, and the PR creator ran it on Windows causing this change.

Co-authored-by: Antonio Spadaro <ilovelinux@users.noreply.github.com>
@gaborbernat
Copy link
Collaborator

@ICEPower420 can you address the coverage issues? Thanks!

@9ao9ai9ar 9ao9ai9ar mentioned this pull request Aug 15, 2025
@ICEPower420
Copy link
Author

@ICEPower420 can you address the coverage issues? Thanks!

Sorry have been a bit preoccupied lately. Hope to get to it somewhere this week.

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.

4 participants