chore: prepare release 0.17.2 #932
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was created by Knope. Merging it will create a new release
Features
Add
--meta=pdm
option for generating PEP621 + PDM metadataThe default metadata is still
--meta=poetry
, which generates apyproject.toml
file with Poetry-specific metadata.This change adds the
--meta=pdm
option which includes PDM-specific metadata, but alsostandard PEP621
metadata. This may be useful as a starting point for other dependency managers & build tools (like Hatch).
Add original OpenAPI
data
attribute toResponse
objectPR #767
In custom templates, you can now access a
response.data
attribute that contains the original OpenAPI definition of theresponse (Response Object or Reference Object).
Include the
UP
rule for generated Ruff configThis enables pyupgrade-like improvements which should replace some
.format()
calls with f-strings.Fixes
Fix Ruff formatting for
--meta=none
PR #940 fixes issue #939. Thanks @satwell!
Due to the lack of
pyproject.toml
, Ruff was not getting configured properly when--meta=none
.As a result, it didn't clean up common generation issues like duplicate imports, which would then cause errors from
linters.
This is now fixed by changing the default
post_hook
toruff check . --fix --extend-select=I
when--meta=none
.Using
generate --meta=none
should now be almost identical to the code generated byupdate
.