Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate docs exampels for Python 3.10 and above #4339

Merged
merged 16 commits into from Aug 14, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"

- uses: actions/cache@v3
id: cache
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -21,6 +21,8 @@ test.py
/docs/.version.md
/docs/.tmp_schema_mappings.html
/docs/.tmp_examples/
/docs/.tmp-projections/
/docs/usage/.tmp-projections/
/site/
/site.zip
.pytest_cache/
Expand Down
11 changes: 6 additions & 5 deletions Makefile
@@ -1,6 +1,7 @@
.DEFAULT_GOAL := all
isort = isort pydantic tests
black = black -S -l 120 --target-version py38 pydantic tests
sources = pydantic tests docs/build
isort = isort $(sources)
black = black -S -l 120 --target-version py38 $(sources)

.PHONY: install-linting
install-linting:
Expand Down Expand Up @@ -35,13 +36,13 @@ build:

.PHONY: format
format:
pyupgrade --py37-plus --exit-zero-even-if-changed `find pydantic tests -name "*.py" -type f`
pyupgrade --py37-plus --exit-zero-even-if-changed `find $(sources) -name "*.py" -type f`
$(isort)
$(black)

.PHONY: lint
lint:
flake8 pydantic/ tests/
flake8 $(sources)
$(isort) --check-only --df
$(black) --check --diff

Expand All @@ -53,7 +54,7 @@ check-dist:

.PHONY: mypy
mypy:
mypy pydantic
mypy pydantic docs/build

.PHONY: pyupgrade
pyupgrade:
Expand Down
1 change: 1 addition & 0 deletions changes/4339-Bobronium.md
@@ -0,0 +1 @@
Add Python 3.9 and 3.10 examples to docs