Zixuan Li

Results 238 comments of Zixuan Li

It turns out that `django_stubs_ext.monkeypatch()` is only supported for [Python 3.7+](https://github.com/typeddjango/django-stubs#i-cannot-use-queryset-or-manager-with-type-annotations), so we need to basically switch to `"AutoField[Union[Combinable, int, str], int]"` (with the `""`) and etc. This allows the...

> It looks like you’ve been rebasing upstream `master` onto your branch. You need to rebase your branch onto upstream `master` instead. > > Your `mypy.ini` is not correct `mypy.ini`...

I'm encoutering a mypy error when switching to the github archive of django-stubs (this still appears without the models commit, and switching to mypy master just gives a more verbose...

**update** 1556 -> 1272 -> 1213 The mypy error has been fixed with a diffferent configuration; With #19376 and #19378, we eliminate approximately 340 similar errors that are mainly in...

With some new fixes pushed to django-stubs, I have updated the dependencies. We have cut the number of errors down to 806. Now I can use django-stubs with mypy daemon,...

Yes. With some new fixes for the models, the number of errors reduced to around 600.

type errors sorted by error code and error message (1825 lines) ``` [arg-type] Argument "GET" to "rest_path" has incompatible type "Tuple[Callable[[HttpRequest, UserProfile, str, str], HttpRequest], Set[str]]"; expected "Union[Callable[..., HttpResponse], Tuple[Callable[...,...

Roughly grouped errors ``` Mismatching type signature (`_CodeCallable` uses `BaseDatabaseSchemaEditor` instead of `DatabaseSchemaEditor`) [arg-type] Argument "reverse_code" to "RunPython" has incompatible type "Callable[[StateApps, DatabaseSchemaEditor], None]"; expected "Optional[_CodeCallable]" zilencer/migrations/0022_remotezulipserver_create_audit_log_backfill.py:42 [arg-type] Argument "reverse_code"...

Comment moved to the top for easier access.

I squashed the mentioned commits and added https://github.com/zulip/zulip/pull/22647/commits/d8ab9bfef164e7b264672a646873487f80a483ba.