diff --git a/tools/linter_lib/pep8.py b/tools/linter_lib/pep8.py index 884cc2904d..1387c6cfee 100644 --- a/tools/linter_lib/pep8.py +++ b/tools/linter_lib/pep8.py @@ -78,7 +78,6 @@ def check_pep8(files): # TODO: Clear up this list of violations. IGNORE_FILES_PEPE261 = [ - 'zerver/tests/test_bugdown.py', 'zerver/tests/test_events.py', 'zerver/tests/test_messages.py', 'zerver/tests/test_narrow.py', diff --git a/zerver/tests/test_bugdown.py b/zerver/tests/test_bugdown.py index 95364f4f7d..80c537dc5d 100644 --- a/zerver/tests/test_bugdown.py +++ b/zerver/tests/test_bugdown.py @@ -102,8 +102,8 @@ class FencedBlockPreprocessorTest(TestCase): processor = bugdown.fenced_code.FencedBlockPreprocessor(None) # Simulate code formatting. - processor.format_code = lambda lang, code: lang + ':' + code # type: ignore # mypy doesn't allow monkey-patching functions - processor.placeholder = lambda s: '**' + s.strip('\n') + '**' # type: ignore # https://github.com/python/mypy/issues/708 + processor.format_code = lambda lang, code: lang + ':' + code # type: ignore # mypy doesn't allow monkey-patching functions + processor.placeholder = lambda s: '**' + s.strip('\n') + '**' # type: ignore # https://github.com/python/mypy/issues/708 markdown = [ '``` .py', @@ -141,8 +141,8 @@ class FencedBlockPreprocessorTest(TestCase): processor = bugdown.fenced_code.FencedBlockPreprocessor(None) # Simulate code formatting. - processor.format_code = lambda lang, code: lang + ':' + code # type: ignore # mypy doesn't allow monkey-patching functions - processor.placeholder = lambda s: '**' + s.strip('\n') + '**' # type: ignore # https://github.com/python/mypy/issues/708 + processor.format_code = lambda lang, code: lang + ':' + code # type: ignore # mypy doesn't allow monkey-patching functions + processor.placeholder = lambda s: '**' + s.strip('\n') + '**' # type: ignore # https://github.com/python/mypy/issues/708 markdown = [ '~~~ quote', @@ -605,7 +605,7 @@ class BugdownTest(ZulipTestCase): directly for testing is kind of awkward ''' class Instance(object): - realm_id = None # type: Optional[int] + realm_id = None # type: Optional[int] instance = Instance() instance.realm_id = realm.id flush_realm_filter(sender=None, instance=instance)