Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit ba8938b

Browse files
author
David Robertson
authored
Reject non-strict types in Pydantic models (#13502)
1 parent b71b41c commit ba8938b

File tree

4 files changed

+440
-1
lines changed

4 files changed

+440
-1
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,22 @@ jobs:
5353
env:
5454
PULL_REQUEST_NUMBER: ${{ github.event.number }}
5555

56+
lint-pydantic:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v2
60+
with:
61+
ref: ${{ github.event.pull_request.head.sha }}
62+
fetch-depth: 0
63+
- uses: matrix-org/setup-python-poetry@v1
64+
with:
65+
extras: "all"
66+
- run: poetry run scripts-dev/check_pydantic_models.py
67+
5668
# Dummy step to gate other tests on without repeating the whole list
5769
linting-done:
5870
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
59-
needs: [lint, lint-crlf, lint-newsfile, check-sampleconfig, check-schema-delta]
71+
needs: [lint, lint-crlf, lint-newsfile, lint-pydantic, check-sampleconfig, check-schema-delta]
6072
runs-on: ubuntu-latest
6173
steps:
6274
- run: "true"

changelog.d/13502.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a linter script which will reject non-strict types in Pydantic models.

0 commit comments

Comments
 (0)