glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
11.93k stars 1.05k forks source link

Fix Python class member comment placement #2443

Closed usefulalgorithm closed 9 months ago

usefulalgorithm commented 9 months ago

Description

For the variable descriptions to be correctly parsed as Python variable docstrings, they need to be place beneath the variable declarations.

Tested with foo.json

Before

截圖 2023-11-17 凌晨2 32 23

After

截圖 2023-11-17 凌晨2 32 49
dvdsgl commented 9 months ago

Thank you!

kopecn commented 7 months ago

@usefulalgorithm Many thanks for the fix.

@dvdsgl Issue https://github.com/glideapps/quicktype/issues/1685 can be marked as dup/fixed.