Skip to content

Commit e2bacbc

Browse files
committed
fix typecheck script
1 parent 835889e commit e2bacbc

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

scripts/typecheck_tests.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
]
2727
TESTS_DIRS = [
2828
'absolute_url_overrides',
29-
# 'admin_*'
3029
]
3130

3231

@@ -76,13 +75,9 @@ def check_with_mypy(abs_path: Path, config_file_path: Path) -> int:
7675
repo = Repo.clone_from('https://github.com/django/django.git', repo_directory)
7776
else:
7877
repo = Repo(repo_directory)
79-
repo.remote().pull(DJANGO_COMMIT_SHA)
80-
81-
branch = repo.heads[DJANGO_BRANCH]
82-
branch.checkout()
83-
assert repo.active_branch.name == DJANGO_BRANCH
84-
assert repo.active_branch.commit.hexsha == DJANGO_COMMIT_SHA
78+
repo.remotes['origin'].pull(DJANGO_BRANCH)
8579

80+
repo.git.checkout(DJANGO_COMMIT_SHA)
8681
for dirname in TESTS_DIRS:
8782
paths = glob.glob(str(tests_root / dirname))
8883
for path in paths:

0 commit comments

Comments
 (0)