mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 07:47:09 +08:00
Fix CI (#1108)
* Fix CI
* Fix CI
* Fix CI
* Fix CI
* APply black
* APply black
* Fix mypy
* Fix mypy errors in django-stubs
* Fix format
* Fix plugin
* Do not patch builtins by default
* Fix mypy
* Only run mypy on 3.10 for now
* Only run mypy on 3.10 for now
* WHAT THE HELL
* Enable strict mode in mypy
* Enable strict mode in mypy
* Fix tests
* Fix tests
* Debug
* Debug
* Fix tests
* Fix tests
* Add TYPE_CHECKING debug
* Caching maybe?
* Caching maybe?
* Try explicit `${{ matrix.python-version }}`
* Remove debug
* Fix typing
* Finally
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import shutil
|
||||
from typing import Optional
|
||||
from typing import Optional, Union
|
||||
|
||||
from git import RemoteProgress, Repo
|
||||
from git.remote import RemoteProgress
|
||||
from git.repo import Repo
|
||||
|
||||
from scripts.paths import DJANGO_SOURCE_DIRECTORY
|
||||
|
||||
@@ -10,7 +11,9 @@ class ProgressPrinter(RemoteProgress):
|
||||
def line_dropped(self, line: str) -> None:
|
||||
print(line)
|
||||
|
||||
def update(self, op_code, cur_count, max_count=None, message=""):
|
||||
def update(
|
||||
self, op_code: int, cur_count: Union[str, float], max_count: Union[str, float, None] = None, message: str = ""
|
||||
) -> None:
|
||||
print(self._cur_line)
|
||||
|
||||
|
||||
@@ -22,7 +25,7 @@ def checkout_django_branch(django_version: str, commit_sha: Optional[str]) -> Re
|
||||
repo = Repo.clone_from(
|
||||
"https://github.com/django/django.git",
|
||||
DJANGO_SOURCE_DIRECTORY,
|
||||
progress=ProgressPrinter(),
|
||||
progress=ProgressPrinter(), # type: ignore
|
||||
branch=branch,
|
||||
depth=100,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user