Skip to content

Instantly share code, notes, and snippets.

@ethanhs
Last active May 24, 2017 02:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethanhs/1b7e0c41cc781810f3f8e250b4466ff1 to your computer and use it in GitHub Desktop.
Save ethanhs/1b7e0c41cc781810f3f8e250b4466ff1 to your computer and use it in GitHub Desktop.
This is the output of following imports in the zulip sources with ignored files removed
# stub issues
zerver/migrations/0081_make_emoji_lowercase.py:34: error: Module has no attribute "validators"
zerver/migrations/0018_realm_emoji_message.py:18: error: Module has no attribute "validators"
zerver/migrations/0013_realmemoji.py:23: error: Module has no attribute "validators"
zerver/migrations/0002_django_1_8.py:18: error: Module has no attribute "contrib"
zerver/tornado/handlers.py:12: error: Module 'django.core' has no attribute 'signals'
zerver/views/auth.py:18: error: Module 'django.core' has no attribute 'signing'
zerver/models.py:188: error: Module has no attribute "contrib"
zproject/backends.py:49: error: Module has no attribute "contrib"
zerver/migrations/0043_realm_filter_validators.py:24: error: Module has no attribute "validators"
zerver/management/commands/process_queue.py:10: error: Module 'django.utils' has no attribute 'autoreload'
zerver/lib/test_helpers.py:7: error: Module 'django.core' has no attribute 'signing'
# this one is really nasty
zerver/tornado/views.py:40: error: Type argument 1 of "has_request_variables" has incompatible value Callable[[HttpRequest, UserProfile, Any, Client, int, List[str], bool, bool, str, bool, Iterable[Sequence[str]], int], Union[HttpResponse, _RespondAsynchronously]]
# template the arguments to these
zerver/decorator.py:288: error: Incompatible return value type (got Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]], expected Callable[..., HttpResponse])
zerver/decorator.py:598: error: Incompatible return value type (got Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]], expected Callable[..., HttpResponse])
zerver/decorator.py:743: error: Incompatible return value type (got "HttpResponse", expected Callable[..., Any])
zerver/webhooks/taiga/view.py:258: error: Incompatible return value type (got "HttpResponse", expected "str")
zerver/webhooks/freshdesk/view.py:130: error: Argument 1 to "warning" has incompatible type "bytes"; expected "str"
zerver/webhooks/bitbucket2/view.py:133: error: Incompatible types in assignment (expression has type "str", variable has type Match[str])
zerver/lib/rest.py:125: error: Incompatible return value type (got "str", expected "HttpResponse")
zerver/views/home.py:93: error: Incompatible return value type (got "Union[Callable[..., HttpResponse], HttpResponse]", expected "HttpResponse")
zerver/views/home.py:93: error: Argument 1 has incompatible type "HttpRequest"; expected Callable[..., HttpResponse]
zerver/views/home.py:100: error: Incompatible return value type (got "Union[Callable[..., HttpResponse], HttpResponse]", expected "HttpResponse")
zerver/views/home.py:100: error: Argument 1 has incompatible type "HttpRequest"; expected Callable[..., HttpResponse]
zerver/views/home.py:117: error: Incompatible return value type (got "Union[Callable[..., HttpResponse], HttpResponse]", expected "HttpResponse")
zerver/views/home.py:117: error: Argument 1 has incompatible type "HttpRequest"; expected Callable[..., HttpResponse]
zerver/views/integrations.py:41: error: Return type of "get_context_data" incompatible with supertype "ContextMixin"
zerver/views/integrations.py:45: error: Incompatible return value type (got Dict[str, object], expected Dict[str, str])
zerver/views/integrations.py:76: error: Signature of "get" incompatible with supertype "TemplateView"
zerver/views/integrations.py:79: error: Argument 1 to "get" of "TemplateView" has incompatible type "HelpView"; expected "HttpRequest"
analytics/urls.py:16: error: Argument 2 to "url" has incompatible type "Union[Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]], Callable[..., HttpResponse]]"; expected Callable[..., HttpResponse]
analytics/urls.py:34: error: List item 0 has incompatible type "RegexURLResolver"
analytics/urls.py:34: error: List item 1 has incompatible type "RegexURLResolver"
zproject/urls.py:58: error: Argument 2 to "url" has incompatible type "Union[Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]], Callable[..., HttpResponse]]"; expected Callable[..., HttpResponse]
zproject/urls.py:115: error: Argument 2 to "url" has incompatible type "Union[Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]], Callable[..., HttpResponse]]"; expected Callable[..., HttpResponse]
zproject/urls.py:125: error: Argument 2 to "url" has incompatible type "Union[Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]], Callable[..., HttpResponse]]"; expected Callable[..., HttpResponse]
# attribute or subclass issue
zerver/views/upload.py:64: error: "UploadedFile" has no attribute "_get_size"
# other
zerver/management/commands/gravatar_to_user_avatar.py:36: error: Cannot instantiate abstract class 'SimpleUploadedFile' with abstract attributes '__iter__', '__len__', ... and 'writelines' (14 methods suppressed)
# these seem related
zilencer/management/commands/profile_request.py:32: error: Incompatible types in assignment (expression has type Dict[<nothing>, <nothing>], variable has type "QueryDict")
zilencer/management/commands/profile_request.py:35: error: Signature of "get_full_path" incompatible with supertype "HttpRequest"
zilencer/management/commands/profile_request.py:59: error: Cannot instantiate abstract class 'MockRequest' with abstract attributes '__enter__', '__exit__', ... and 'writelines' (11 methods suppressed)
zerver/lib/integrations.py:116: error: No overload variant of "url" matches argument types [builtins.str, builtins.str]
zerver/webhooks/github_dispatcher.py:13: error: "HttpResponse" not callable
zproject/urls.py:440: error: No overload variant of "url" matches argument types [builtins.str, django.http.response.HttpResponse, builtins.str]
zproject/urls.py:455: error: No overload variant of "url" matches argument types [builtins.str, django.http.response.HttpResponse, builtins.str]
# testing things
zerver/lib/test_classes.py:256: error: Missing return statement
zerver/lib/test_classes.py:390: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_urls.py:111: error: Name 'django.core.urlresolvers.RegexURLPattern' is not defined
zerver/tests/test_tornado.py:83: error: Argument 1 has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_tornado.py:158: error: Argument 1 to "tornado_call" of "TornadoTestCase" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_sessions.py:29: error: "HttpResponse" has no attribute "url"
zerver/tests/test_sessions.py:42: error: "HttpResponse" has no attribute "url"
zerver/tests/test_sessions.py:71: error: "HttpResponse" has no attribute "url"
zerver/tests/test_sessions.py:88: error: "HttpResponse" has no attribute "url"
zerver/tests/test_presence.py:265: error: "HttpResponse" has no attribute "json"
zerver/tests/test_presence.py:282: error: "HttpResponse" has no attribute "json"
zerver/tests/test_presence.py:292: error: "HttpResponse" has no attribute "json"
zerver/tests/test_presence.py:304: error: "HttpResponse" has no attribute "json"
zerver/tests/test_narrow.py:1073: error: Argument 1 to "get_messages_backend" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_narrow.py:1105: error: Argument 1 to "get_messages_backend" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_narrow.py:1133: error: Argument 1 to "get_messages_backend" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_narrow.py:1173: error: Argument 1 to "get_messages_backend" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_events.py:209: error: Argument 1 has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_events.py:219: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:228: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:237: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:250: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:270: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:285: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:307: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:317: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_events.py:330: error: Argument 1 to "tornado_call" of "GetEventsTest" has incompatible type Callable[..., Union[HttpResponse, _RespondAsynchronously]]; expected Callable[[HttpRequest, UserProfile], HttpResponse]
zerver/tests/test_email_change.py:191: error: "HttpResponse" has no attribute "json"
zerver/tests/test_email_change.py:192: error: "HttpResponse" has no attribute "json"
zerver/tests/test_docs.py:63: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_docs.py:81: error: Argument 2 to "add_api_uri_context" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_docs.py:90: error: Argument 2 to "add_api_uri_context" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_docs.py:100: error: Argument 2 to "add_api_uri_context" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:65: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:66: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:74: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:75: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:83: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:84: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:92: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:93: error: Argument 1 to "get_client_name" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:107: error: Type argument 1 of "has_request_variables" has incompatible value Callable[[HttpRequest, Iterable[int]], int]
zerver/tests/test_decorators.py:119: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:123: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:128: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:133: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:137: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:143: error: Type argument 1 of "has_request_variables" has incompatible value Callable[[HttpRequest, Iterable[int]], int]
zerver/tests/test_decorators.py:152: error: Type argument 1 of "has_request_variables" has incompatible value Callable[[HttpRequest, Iterable[int]], int]
zerver/tests/test_decorators.py:164: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:168: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:173: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:177: error: Argument 1 to "get_total" has incompatible type "Request"; expected "HttpRequest"
zerver/tests/test_decorators.py:182: error: Type argument 1 of "has_request_variables" has incompatible value Callable[[HttpRequest, Dict[str, Dict[Any, Any]]], Dict[str, Dict[Any, Any]]]
zerver/tests/test_decorators.py:194: error: Argument 1 to "get_payload" has incompatible type "MockRequest"; expected "HttpRequest"
zerver/tests/test_decorators.py:198: error: Argument 1 to "get_payload" has incompatible type "MockRequest"; expected "HttpRequest"
zerver/tests/test_decorators.py:206: error: Argument 1 to "test" has incompatible type "MockRequest"; expected "HttpRequest"
zerver/tests/test_decorators.py:230: error: "HttpResponse" not callable
zerver/tests/test_decorators.py:239: error: "HttpResponse" not callable
zerver/tests/test_decorators.py:249: error: "HttpResponse" not callable
zerver/tests/test_decorators.py:257: error: "HttpResponse" not callable
zerver/tests/test_decorators.py:274: error: "HttpResponse" not callable
zerver/tests/test_decorators.py:282: error: "HttpResponse" not callable
zerver/tests/test_decorators.py:312: error: Incompatible types in assignment (expression has type Callable[..., HttpResponse], variable has type Callable[[Any], str])
zerver/tests/test_decorators.py:312: error: Argument 1 has incompatible type Callable[[Any], str]; expected Callable[..., HttpResponse]
zerver/tests/test_decorators.py:336: error: Incompatible types in assignment (expression has type Callable[..., HttpResponse], variable has type Callable[[Any], str])
zerver/tests/test_decorators.py:336: error: Argument 1 has incompatible type Callable[[Any], str]; expected Callable[..., HttpResponse]
zerver/tests/test_decorators.py:362: error: Incompatible types in assignment (expression has type Callable[..., HttpResponse], variable has type Callable[[Any], str])
zerver/tests/test_decorators.py:362: error: Argument 1 has incompatible type Callable[[Any], str]; expected Callable[..., HttpResponse]
zerver/tests/test_decorators.py:387: error: Incompatible types in assignment (expression has type Callable[..., HttpResponse], variable has type Callable[[Any], str])
zerver/tests/test_decorators.py:387: error: Argument 1 has incompatible type Callable[[Any], str]; expected Callable[..., HttpResponse]
zerver/tests/test_decorators.py:774: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:779: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:782: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:788: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:794: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:798: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:808: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:819: error: Argument 1 to "validate_api_key" has incompatible type "HostRequestMock"; expected "HttpRequest"
zerver/tests/test_decorators.py:845: error: "HttpResponse" not callable
zerver/tests/test_custom_profile_data.py:26: error: "HttpResponse" has no attribute "json"
zerver/tests/test_bots.py:133: error: Incompatible types in assignment (expression has type "HttpResponse", variable has type Dict[str, Any])
zerver/tests/test_bots.py:134: error: Argument 1 to "assert_json_error" of "ZulipTestCase" has incompatible type Dict[str, Any]; expected "HttpResponse"
zerver/tests/test_bots.py:216: error: Incompatible types in assignment (expression has type Dict[str, Any], variable has type "HttpResponse")
zerver/tests/test_auth_backends.py:11: error: Module 'django.core' has no attribute 'signing'
zerver/tests/test_auth_backends.py:458: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:468: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:478: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:679: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:680: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:685: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:686: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:696: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:709: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:766: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:770: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:772: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:777: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:799: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:818: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:903: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:929: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:975: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:980: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:989: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:1001: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:1036: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:1048: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:1059: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:1126: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:2012: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:2015: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:2046: error: "HttpResponse" has no attribute "url"
zerver/tests/test_auth_backends.py:2105: error: Argument 1 to "login_or_register_remote_user" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_auth_backends.py:2111: error: "HttpResponse" has no attribute "url"
zerver/tests/test_upload.py:82: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_upload.py:507: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_upload.py:545: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_upload.py:579: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_upload.py:719: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_upload.py:874: error: "HttpResponse" has no attribute "streaming_content"
zerver/tests/test_subs.py:2194: error: "HttpResponse" has no attribute "json"
zerver/tests/test_signup.py:1659: error: "HttpResponse" has no attribute "url"
zerver/tests/test_signup.py:1669: error: "HttpResponse" has no attribute "url"
zerver/tests/test_signup.py:1677: error: "HttpResponse" has no attribute "url"
zerver/tests/test_signup.py:1728: error: "HttpResponse" has no attribute "url"
zerver/tests/test_signup.py:1736: error: "HttpResponse" has no attribute "url"
zerver/tests/test_signup.py:1793: error: Argument 1 to "login_or_register_remote_user" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_signup.py:1811: error: Argument 1 to "login_or_register_remote_user" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_signup.py:1818: error: "HttpResponse" has no attribute "url"
zerver/tests/test_signup.py:1827: error: Argument 1 to "login_or_register_remote_user" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_signup.py:1846: error: Argument 1 to "login_or_register_remote_user" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_signup.py:1855: error: "HttpResponse" has no attribute "url"
zerver/tests/test_signup.py:1868: error: Argument 1 to "login_or_register_remote_user" has incompatible type "POSTRequestMock"; expected "HttpRequest"
zerver/tests/test_signup.py:1877: error: "HttpResponse" has no attribute "url"
zerver/tests/test_home.py:417: error: Argument 1 to "home" has incompatible type "HostRequestMock"; expected "HttpRequest"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment