mirror of
https://github.com/koxudaxi/datamodel-code-generator.git
synced 2024-03-18 14:54:37 +03:00
* Make small grammatical and phrasing changes, update external like to JSON schema docs, remove unused schema keywords, unify JSON Schema language * Title case some headers, modify some phrasing, remove duplicate custom template docs, clean up using_as_module with phrasing and removal of redundant ending. * Add crosslinks between documents for clarity, rephrase sectinos, unify representation of "JSON Schema", remove specifictation of temporary directory use * Reword "File" to "Data" to include python dicts, update working on project mentions * Update language from "repositories" to "projects" to include links that are not repos * Small phrasing update * Update phrasing of supported data page for clairty * Unify representation of "JSON", remove redundant information from index * Synchronize changes between readme and index page * Standardize formatting, fix heading levels
884 B
884 B
Formatting
Code generated by datamodel-codegen will be passed through isort and
black to produce consistent, well-formatted results. Settings for these tools
can be specified in pyproject.toml (located in the output directory, or in
some parent of the output directory). Also for black you can disable
skip-string-normalization with using datamodel-codegen option --use-double-quotes,
it will override your black config skip-string-normalization value.
Using --use-double-quotes may be useful if you can't use black config.
Example
pyproject.toml
[tool.black]
skip-string-normalization = true
line-length = 100
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 100
known_first_party = "kelvin"
See the Black Project for more information.