mirror of https://github.com/zulip/zulip.git
mypy: Remove now-unused type: ignores.
This commit is contained in:
parent
ecadb33fbc
commit
473c0ee1fe
|
@ -445,9 +445,9 @@ class Client(object):
|
|||
# type: () -> Tuple[str, int]
|
||||
while True:
|
||||
if event_types is None:
|
||||
res = self.register() # type: ignore
|
||||
res = self.register()
|
||||
else:
|
||||
res = self.register(event_types=event_types, narrow=narrow) # type: ignore
|
||||
res = self.register(event_types=event_types, narrow=narrow)
|
||||
|
||||
if 'error' in res.get('result'):
|
||||
if self.verbose:
|
||||
|
@ -461,7 +461,7 @@ class Client(object):
|
|||
if queue_id is None:
|
||||
(queue_id, last_event_id) = do_register()
|
||||
|
||||
res = self.get_events(queue_id=queue_id, last_event_id=last_event_id) # type: ignore
|
||||
res = self.get_events(queue_id=queue_id, last_event_id=last_event_id)
|
||||
if 'error' in res.get('result'):
|
||||
if res["result"] == "http-error":
|
||||
if self.verbose:
|
||||
|
@ -745,7 +745,7 @@ class ZulipStream(object):
|
|||
"to": self.to,
|
||||
"subject": self.subject,
|
||||
"content": content}
|
||||
self.client.send_message(message) # type: ignore
|
||||
self.client.send_message(message)
|
||||
|
||||
def flush(self):
|
||||
# type: () -> None
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
import os
|
||||
from six.moves import configparser # type: ignore # https://github.com/python/typeshed/issues/307
|
||||
from six.moves import configparser
|
||||
import sys
|
||||
import subprocess
|
||||
import logging
|
||||
|
|
|
@ -76,7 +76,7 @@ class ParserTestHappyPath(unittest.TestCase):
|
|||
div {
|
||||
}'''
|
||||
error = 'Empty declaration'
|
||||
with self.assertRaisesRegex(CssParserException, error): # type: ignore # See https://github.com/python/typeshed/issues/372
|
||||
with self.assertRaisesRegex(CssParserException, error):
|
||||
parse(my_css)
|
||||
|
||||
def test_multi_line_selector(self):
|
||||
|
@ -144,7 +144,7 @@ class ParserTestSadPath(unittest.TestCase):
|
|||
|
||||
def _assert_error(self, my_css, error):
|
||||
# type: (str, str) -> None
|
||||
with self.assertRaisesRegex(CssParserException, error): # type: ignore # See https://github.com/python/typeshed/issues/372
|
||||
with self.assertRaisesRegex(CssParserException, error):
|
||||
parse(my_css)
|
||||
|
||||
def test_unexpected_end_brace(self):
|
||||
|
|
|
@ -265,7 +265,7 @@ class TestDigestEmailMessages(ZulipTestCase):
|
|||
self.assert_json_success(result)
|
||||
|
||||
user_profile = get_user_profile_by_email("othello@zulip.com")
|
||||
cutoff = time.mktime(datetime.datetime(year=2016, month=1, day=1).timetuple()) # type: ignore # https://github.com/python/typeshed/pull/597
|
||||
cutoff = time.mktime(datetime.datetime(year=2016, month=1, day=1).timetuple())
|
||||
|
||||
handle_digest_email(user_profile.id, cutoff)
|
||||
self.assertEqual(mock_send_future_email.call_count, 1)
|
||||
|
|
|
@ -44,7 +44,7 @@ def serve_local(request, path_id):
|
|||
return HttpResponseNotFound('<p>File not found</p>')
|
||||
filename = os.path.basename(local_path)
|
||||
response = FileResponse(open(local_path, 'rb'),
|
||||
content_type = mimetypes.guess_type(filename)) # type: ignore # https://github.com/python/typeshed/issues/559
|
||||
content_type = mimetypes.guess_type(filename))
|
||||
return response
|
||||
|
||||
@has_request_variables
|
||||
|
|
Loading…
Reference in New Issue