diff --git a/zerver/decorator.py b/zerver/decorator.py index f4b8785518..daa6c0fe50 100644 --- a/zerver/decorator.py +++ b/zerver/decorator.py @@ -461,12 +461,12 @@ def authenticated_rest_api_view(is_webhook=False): return json_unauthorized(e.msg) request.user = profile if is_remote_server(role): - assert isinstance(profile, RemoteZulipServer) # type: ignore # https://github.com/python/mypy/issues/2957 + assert isinstance(profile, RemoteZulipServer) request._email = "zulip-server:" + role profile.rate_limits = "" process_client(request, profile, remote_server_request=True) else: - assert isinstance(profile, UserProfile) # type: ignore # https://github.com/python/mypy/issues/2957 + assert isinstance(profile, UserProfile) request._email = profile.email process_client(request, profile) # Apply rate limiting diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index cae94b0e6f..369ff28986 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -1164,7 +1164,7 @@ def extract_recipients(s): data = s if isinstance(data, six.string_types): - data = data.split(',') # type: ignore # https://github.com/python/typeshed/pull/138 + data = data.split(',') if not isinstance(data, list): raise ValueError("Invalid data type for recipients")