koxudaxi / datamodel-code-generator

Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
https://koxudaxi.github.io/datamodel-code-generator/
MIT License
2.65k stars 296 forks source link

Fix alias for superclass with identical name #1981

Closed kmichel-aiven closed 3 months ago

kmichel-aiven commented 4 months ago

If an externally imported model is renamed because it has the same name as the current model, the alias was incorrectly suffixed with the original name.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@decc493). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1981 +/- ## ======================================= Coverage ? 98.90% ======================================= Files ? 37 Lines ? 4183 Branches ? 972 ======================================= Hits ? 4137 Misses ? 29 Partials ? 17 ``` | [Flag](https://app.codecov.io/gh/koxudaxi/datamodel-code-generator/pull/1981/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Koudai+Aono) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/koxudaxi/datamodel-code-generator/pull/1981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Koudai+Aono) | `98.56% <ø> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Koudai+Aono#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codspeed-hq[bot] commented 4 months ago

CodSpeed Performance Report

Merging #1981 will not alter performance

Comparing kmichel-aiven:kmichel-fix-reference-to-superclass (6446dfa) with main (decc493)

Summary

✅ 29 untouched benchmarks