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

fix: Use supported version in typecheck_tests command in Contributing guide #1251

Merged
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
fix: Use supported version in typecheck_tests command in Contributing…
… guide

The `typecheck_tests.py` script only supports the Django versions
included in its `DJANGO_COMMIT_REFS` map. Version `3.1` is no longer
present, so the command from the Contributing guide failed.

For consistency, the Django version used for the `stubgen-django.py`
commands has been also updated.
adamantike committed Nov 12, 2022

Verified

This commit was signed with the committer’s verified signature.
rm3l Armel Soro
commit e2def3cb253e49057c4441adc71e4654c368da37
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ We also test the stubs against Django's own test suite. This is done in CI but y
To execute the script run:

```bash
python ./scripts/typecheck_tests.py --django_version 3.1
python ./scripts/typecheck_tests.py --django_version 3.2
```


@@ -90,13 +90,13 @@ The stubs are based on auto-generated code created by Mypy's stubgen tool (see:
To make life easier we have a helper script that auto generates these stubs. To use it you can run:

```bash
python ./scripts/stubgen-django.py --django_version 3.1
python ./scripts/stubgen-django.py --django_version 3.2
```

You can also pass an optional commit hash as a second kwarg to checkout a specific commit, e.g.

```bash
python ./scripts/stubgen-django.py --django_version 3.1 --commit_sha <commit_sha>
python ./scripts/stubgen-django.py --django_version 3.2 --commit_sha <commit_sha>
```

The output for this is a gitignored folder called "stubgen" in the repo's root.