mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	mypy: Remove now-unused type: ignores.
This commit is contained in:
		@@ -445,9 +445,9 @@ class Client(object):
 | 
				
			|||||||
            # type: () -> Tuple[str, int]
 | 
					            # type: () -> Tuple[str, int]
 | 
				
			||||||
            while True:
 | 
					            while True:
 | 
				
			||||||
                if event_types is None:
 | 
					                if event_types is None:
 | 
				
			||||||
                    res = self.register() # type: ignore
 | 
					                    res = self.register()
 | 
				
			||||||
                else:
 | 
					                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 'error' in res.get('result'):
 | 
				
			||||||
                    if self.verbose:
 | 
					                    if self.verbose:
 | 
				
			||||||
@@ -461,7 +461,7 @@ class Client(object):
 | 
				
			|||||||
            if queue_id is None:
 | 
					            if queue_id is None:
 | 
				
			||||||
                (queue_id, last_event_id) = do_register()
 | 
					                (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 'error' in res.get('result'):
 | 
				
			||||||
                if res["result"] == "http-error":
 | 
					                if res["result"] == "http-error":
 | 
				
			||||||
                    if self.verbose:
 | 
					                    if self.verbose:
 | 
				
			||||||
@@ -745,7 +745,7 @@ class ZulipStream(object):
 | 
				
			|||||||
                   "to": self.to,
 | 
					                   "to": self.to,
 | 
				
			||||||
                   "subject": self.subject,
 | 
					                   "subject": self.subject,
 | 
				
			||||||
                   "content": content}
 | 
					                   "content": content}
 | 
				
			||||||
        self.client.send_message(message) # type: ignore
 | 
					        self.client.send_message(message)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def flush(self):
 | 
					    def flush(self):
 | 
				
			||||||
        # type: () -> None
 | 
					        # type: () -> None
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/usr/bin/env python
 | 
					#!/usr/bin/env python
 | 
				
			||||||
from __future__ import print_function
 | 
					from __future__ import print_function
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
from six.moves import configparser # type: ignore # https://github.com/python/typeshed/issues/307
 | 
					from six.moves import configparser
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
import logging
 | 
					import logging
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -76,7 +76,7 @@ class ParserTestHappyPath(unittest.TestCase):
 | 
				
			|||||||
            div {
 | 
					            div {
 | 
				
			||||||
            }'''
 | 
					            }'''
 | 
				
			||||||
        error = 'Empty declaration'
 | 
					        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)
 | 
					            parse(my_css)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_multi_line_selector(self):
 | 
					    def test_multi_line_selector(self):
 | 
				
			||||||
@@ -144,7 +144,7 @@ class ParserTestSadPath(unittest.TestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def _assert_error(self, my_css, error):
 | 
					    def _assert_error(self, my_css, error):
 | 
				
			||||||
        # type: (str, str) -> None
 | 
					        # 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)
 | 
					            parse(my_css)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_unexpected_end_brace(self):
 | 
					    def test_unexpected_end_brace(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -265,7 +265,7 @@ class TestDigestEmailMessages(ZulipTestCase):
 | 
				
			|||||||
        self.assert_json_success(result)
 | 
					        self.assert_json_success(result)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        user_profile = get_user_profile_by_email("othello@zulip.com")
 | 
					        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)
 | 
					        handle_digest_email(user_profile.id, cutoff)
 | 
				
			||||||
        self.assertEqual(mock_send_future_email.call_count, 1)
 | 
					        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>')
 | 
					        return HttpResponseNotFound('<p>File not found</p>')
 | 
				
			||||||
    filename = os.path.basename(local_path)
 | 
					    filename = os.path.basename(local_path)
 | 
				
			||||||
    response = FileResponse(open(local_path, 'rb'),
 | 
					    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
 | 
					    return response
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@has_request_variables
 | 
					@has_request_variables
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user