You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was created by Knope. Merging it will create a new release
### Features
#### Add `--meta=pdm` option for generating PEP621 + PDM metadata
The default metadata is still `--meta=poetry`, which generates a
`pyproject.toml` file with Poetry-specific metadata.
This change adds the `--meta=pdm` option which includes
[PDM](https://pdm-project.org/latest/)-specific metadata, but also
standard
[PEP621](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml)
metadata. This may be useful as a starting point for other dependency
managers & build tools (like Hatch).
#### Add original OpenAPI `data` attribute to `Response` object
PR #767
In custom templates, you can now access a `response.data` attribute that
contains the original OpenAPI definition of the
response (Response Object or Reference Object).
#### Include the `UP` rule for generated Ruff config
This enables [pyupgrade-like
improvements](https://docs.astral.sh/ruff/rules/#pyupgrade-up) 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` to `ruff check .
--fix --extend-select=I` when `--meta=none`.
Using `generate --meta=none` should now be almost identical to the code
generated by `update`.
Co-authored-by: GitHub <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+36
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,42 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t
13
13
14
14
The 0.x prefix used in versions for this project is to indicate that breaking changes are expected frequently (several times a year). Breaking changes will increment the minor number, all other changes will increment the patch number. You can track the progress toward 1.0 [here](https://github.com/openapi-generators/openapi-python-client/projects/2).
15
15
16
+
## 0.17.2 (2024-01-15)
17
+
18
+
### Features
19
+
20
+
#### Add `--meta=pdm` option for generating PEP621 + PDM metadata
21
+
22
+
The default metadata is still `--meta=poetry`, which generates a `pyproject.toml` file with Poetry-specific metadata.
23
+
This change adds the `--meta=pdm` option which includes [PDM](https://pdm-project.org/latest/)-specific metadata, but also
24
+
standard [PEP621](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml)
25
+
metadata. This may be useful as a starting point for other dependency managers & build tools (like Hatch).
26
+
27
+
#### Add original OpenAPI `data` attribute to `Response` object
28
+
29
+
PR #767
30
+
31
+
In custom templates, you can now access a `response.data` attribute that contains the original OpenAPI definition of the
32
+
response (Response Object or Reference Object).
33
+
34
+
#### Include the `UP` rule for generated Ruff config
35
+
36
+
This enables [pyupgrade-like improvements](https://docs.astral.sh/ruff/rules/#pyupgrade-up) which should replace some
37
+
`.format()` calls with f-strings.
38
+
39
+
### Fixes
40
+
41
+
#### Fix Ruff formatting for `--meta=none`
42
+
43
+
PR #940 fixes issue #939. Thanks @satwell!
44
+
45
+
Due to the lack of `pyproject.toml`, Ruff was not getting configured properly when `--meta=none`.
46
+
As a result, it didn't clean up common generation issues like duplicate imports, which would then cause errors from
47
+
linters.
48
+
49
+
This is now fixed by changing the default `post_hook` to `ruff check . --fix --extend-select=I` when `--meta=none`.
50
+
Using `generate --meta=none` should now be almost identical to the code generated by `update`.
0 commit comments