Fix 'line-too-long' warnings
diff --git a/third_party/yapf_third_party/_ylib2to3/fixer_base.py b/third_party/yapf_third_party/_ylib2to3/fixer_base.py
index 5214c02..92fd0f6 100644
--- a/third_party/yapf_third_party/_ylib2to3/fixer_base.py
+++ b/third_party/yapf_third_party/_ylib2to3/fixer_base.py
@@ -169,7 +169,8 @@
class ConditionalFix(BaseFix):
""" Base class for fixers which not execute if an import is found. """
- # This is the name of the import which, if found, will cause the test to be skipped
+ # This is the name of the import which, if found, will cause the test to be
+ # skipped.
skip_on = None
def start_tree(self, *args):
diff --git a/yapftests/reformatter_buganizer_test.py b/yapftests/reformatter_buganizer_test.py
index 1efa81b..fcfd78e 100644
--- a/yapftests/reformatter_buganizer_test.py
+++ b/yapftests/reformatter_buganizer_test.py
@@ -344,7 +344,7 @@
('eeeeeeeeeeeeeeeeeeeeee', 'eeeeeeeeeeeeeeeeeeeeeeeeeee'),
]:
pass
- """)
+ """) # noqa
llines = yapf_test_helper.ParseAndUnwrap(code)
self.assertCodeEqual(code, reformatter.Reformat(llines))
@@ -393,7 +393,7 @@
aaaaaaaaaaaaaaaaaaaaaa=1,
bbbbbbbbbbbbbbbbbbbbb=2,
ccccccccccccccccccc=3)
- """)
+ """) # noqa
llines = yapf_test_helper.ParseAndUnwrap(code)
self.assertCodeEqual(code, reformatter.Reformat(llines))
@@ -645,7 +645,7 @@
k.TimestampMicros() / 1000000L) -
m.Cond(m.VAL['start'] != 0, m.VAL['start'],
m.TimestampMicros() / 1000000L)))
- """)
+ """) # noqa
llines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(llines))
diff --git a/yapftests/reformatter_pep8_test.py b/yapftests/reformatter_pep8_test.py
index a027d99..65e506b 100644
--- a/yapftests/reformatter_pep8_test.py
+++ b/yapftests/reformatter_pep8_test.py
@@ -831,9 +831,9 @@
def testWithSpaceInsideBrackets(self):
style.SetGlobalStyle(
- style.CreateStyleFromConfig(
- '{spaces_around_subscript_colon: true, space_inside_brackets: true,}'
- )) # noqa
+ style.CreateStyleFromConfig("""\
+ {spaces_around_subscript_colon: true, space_inside_brackets: true,}
+ """)) # noqa
expected_formatted_code = textwrap.dedent("""\
a = list1[ : ]
b = list2[ slice_start : ]
diff --git a/yapftests/reformatter_python3_test.py b/yapftests/reformatter_python3_test.py
index b2ec335..f5741b3 100644
--- a/yapftests/reformatter_python3_test.py
+++ b/yapftests/reformatter_python3_test.py
@@ -301,7 +301,7 @@
def run_sync_in_worker_thread(sync_fn, *args, cancellable=False, limiter=None):
pass
- """)
+ """) # noqa
try:
style.SetGlobalStyle(