Skip to content

Commit 0886c0e

Browse files
cosmo-grantCosmo Grantpre-commit-ci[bot]
authored
fix: documentation for --allow-extra-fields (#2416)
* fix documentation for --allow-extra-fields * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Cosmo Grant <cosmo.grant@postcodelottery.co.uk> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent edc9ee7 commit 0886c0e

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,8 @@ Field customization:
439439
Use schema description to populate field docstring
440440

441441
Model customization:
442-
--allow-extra-fields Deprecated: Allow passing extra fields, if this flag is not passed,
443-
extra fields are forbidden. This flag is deprecated. Use `--extra-
444-
fields=allow` instead.
442+
--allow-extra-fields Deprecated: Allow passing extra fields. This flag is deprecated. Use
443+
`--extra-fields=allow` instead.
445444
--allow-population-by-field-name
446445
Allow population by field name
447446
--class-name CLASS_NAME

docs/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,8 @@ Field customization:
431431
Use schema description to populate field docstring
432432

433433
Model customization:
434-
--allow-extra-fields Deprecated: Allow passing extra fields, if this flag is not passed,
435-
extra fields are forbidden. This flag is deprecated. Use `--extra-
436-
fields=allow` instead.
434+
--allow-extra-fields Deprecated: Allow passing extra fields. This flag is deprecated. Use
435+
`--extra-fields=allow` instead.
437436
--allow-population-by-field-name
438437
Allow population by field name
439438
--class-name CLASS_NAME

src/datamodel_code_generator/arguments.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ def start_section(self, heading: str | None) -> None:
9797
# ======================================================================================
9898
extra_fields_model_options.add_argument(
9999
"--allow-extra-fields",
100-
help="Deprecated: Allow passing extra fields, if this flag is not passed, extra fields are forbidden. "
101-
"This flag is deprecated. Use `--extra-fields=allow` instead.",
100+
help="Deprecated: Allow passing extra fields. This flag is deprecated. Use `--extra-fields=allow` instead.",
102101
action="store_true",
103102
default=None,
104103
)

0 commit comments

Comments
 (0)