mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
pep8: Add compliance with rule E261 to tests/test_bugdown.py.
This commit is contained in:
committed by
Tim Abbott
parent
7d7f2f78c8
commit
ee97ea1356
@@ -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',
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user