mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-13 23:41:55 +08:00
updated package setup (#485)
* updated package setup * updated to use python 3.9 * fixed test runner * fixed typecheck tests * fixed discrepencies * added override to runner * updated travis * updated pre-commit hooks * updated dep
This commit is contained in:
committed by
GitHub
parent
a3624dec36
commit
44151c485d
15
scripts/stubgen-django.py
Normal file
15
scripts/stubgen-django.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from argparse import ArgumentParser
|
||||
|
||||
from mypy.stubgen import generate_stubs, parse_options
|
||||
|
||||
from scripts.git_helpers import checkout_django_branch
|
||||
from scripts.paths import DJANGO_SOURCE_DIRECTORY
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument("--django_version", required=True)
|
||||
parser.add_argument("--commit_sha", required=False)
|
||||
args = parser.parse_args()
|
||||
checkout_django_branch(args.django_version, args.commit_sha)
|
||||
stubgen_options = parse_options([f"{DJANGO_SOURCE_DIRECTORY}", "-o=stubgen"])
|
||||
generate_stubs(stubgen_options)
|
||||
Reference in New Issue
Block a user