Is your feature request related to a problem? Please describe.
Currently I'm trying to workaround some problem described before, so I created some really strange template with imports but generator also adds some imports which are not used anymore. So I would like to remove those unused imports with for example autoflake
(because isort/black cannot do this atm and looks like it will never be their ability).
Describe the solution you'd like
The most variable solution is probably ability to add custom formatters (or in general scripts to be run after generation is completed).
This could be configured easily in pyproject.toml like this
[tool.datamodel-codegen.formatter.autoflake]
executable = autoflake
args = --remove-unused-variables
Describe alternatives you've considered
Creating own makefile target for this - combined running generator and then in next round running autoflake
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too