Skip to content
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

Fix msgspec root import #1611

Merged
merged 1 commit into from
Oct 8, 2023
Merged

Fix msgspec root import #1611

merged 1 commit into from
Oct 8, 2023

Conversation

koxudaxi
Copy link
Owner

@koxudaxi koxudaxi commented Oct 7, 2023

Closes: #1607

@codecov
Copy link

codecov bot commented Oct 7, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (e9b6edf) 100.00% compared to head (3d83f76) 100.00%.
Report is 739 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##            master     #1611     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           11        34     +23     
  Lines         1020      3755   +2735     
  Branches       201       879    +678     
===========================================
+ Hits          1020      3755   +2735     
Flag Coverage Δ
unittests 99.65% <99.60%> (?)

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

Files Coverage Δ
datamodel_code_generator/__init__.py 100.00% <100.00%> (ø)
datamodel_code_generator/__main__.py 100.00% <100.00%> (ø)
datamodel_code_generator/arguments.py 100.00% <100.00%> (ø)
datamodel_code_generator/format.py 100.00% <100.00%> (ø)
datamodel_code_generator/http.py 100.00% <100.00%> (ø)
datamodel_code_generator/imports.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/__init__.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/base.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/dataclass.py 100.00% <100.00%> (ø)
datamodel_code_generator/model/enum.py 100.00% <100.00%> (ø)
... and 24 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@koxudaxi
Copy link
Owner Author

koxudaxi commented Oct 7, 2023

@indrat
I have moved the imports method to decorator. I apply it to RootModel too.

Could you please review it?

(Maybe, we should check another output model type too? 🤔 )

@indrat
Copy link
Contributor

indrat commented Oct 7, 2023

lgtm 👍 thank you for your amazing work :)

@koxudaxi koxudaxi merged commit 339f6c6 into master Oct 8, 2023
73 checks passed
@koxudaxi koxudaxi deleted the fix_msgspec_root_import branch October 8, 2023 00:35
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.

msgspec output of a directory input where a schema only contains a root model is missing imports
2 participants