Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1239)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/formatter/main_unittest.py

Issue 2256793002: Make docstrings more consistent using format-webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make indentation of final quote based on parse tree (indentation prior to docstring node) rather th… Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/formatter/main_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/formatter/main_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/formatter/main_unittest.py
index 0cfb5aedee96d42f6f182e3444dabc05d26b8da0..963aedf738def71cfca29b967b44d716b21efe62 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/formatter/main_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/formatter/main_unittest.py
@@ -133,3 +133,20 @@ def f():
"""
return x
''')
+
+ def test_format_docstrings_indentation(self):
+ host = MockSystemHost()
+ host.stdin = StringIO.StringIO('''
+def f():
+ """This is a docstring
+ With extra indentation on this line.
+
+ """
+''')
+ main(host, ['-'])
+ self.assertMultiLineEqual(host.stdout.getvalue(), '''
+def f():
+ """This is a docstring
+ With extra indentation on this line.
+ """
+''')

Powered by Google App Engine
This is Rietveld 408576698