Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ repos:
hooks:
- id: readme
name: Update README command help
entry: bash -c 'test -x .tox/fix/bin/python || tox run -e fix --notest -qq; .tox/fix/bin/python scripts/update_command_help_on_markdown.py'
entry: bash -c '[ -x .tox/fix/bin/python ] && PYTHON=.tox/fix/bin/python || PYTHON=.tox/fix/Scripts/python; test -x "$PYTHON" || tox run -e fix --notest -qq; "$PYTHON" scripts/update_command_help_on_markdown.py'
language: system
files: ^(src/datamodel_code_generator/arguments\.py|README\.md|docs/index\.md)$
pass_filenames: false
- id: config-types
name: Generate config TypedDicts
entry: bash -c 'test -x .tox/dev/bin/python || tox run -e dev --notest -qq; .tox/dev/bin/datamodel-codegen --profile generate-config-dict && .tox/dev/bin/datamodel-codegen --profile parser-config-dict && .tox/dev/bin/datamodel-codegen --profile parse-config-dict'
entry: bash -c '[ -x .tox/dev/bin/python ] && PREFIX=.tox/dev/bin || PREFIX=.tox/dev/Scripts; test -x "$PREFIX/python" || tox run -e dev --notest -qq; "$PREFIX/datamodel-codegen" --profile generate-config-dict && "$PREFIX/datamodel-codegen" --profile parser-config-dict && "$PREFIX/datamodel-codegen" --profile parse-config-dict'
language: system
files: ^src/datamodel_code_generator/config\.py$
pass_filenames: false
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ def _assert_with_external_file(content: str, expected_path: Path) -> None:
msg = f"Content mismatch for {expected_path}\n{hint}\n{diff}"
raise AssertionError(msg) from None
else:
assert expected == normalized_content # pragma: no cover
# we need to normalize the external_file object's content as well
assert _normalize_line_endings(expected._load_value()) == normalized_content # pragma: no cover


class AssertFileContent(Protocol):
Expand Down
Loading