Commit 7b1b1ba4 authored by Mike Frysinger's avatar Mike Frysinger Committed by Commit Bot

grit: strip trailing blank lines

Newer pylint warns when files have trailing blank lines.  Trim them.

Bug: 866772
Change-Id: Iacfd1dcb0eb16d33aa5cf382aecb5b1dd4e7efa7
Reviewed-on: https://chromium-review.googlesource.com/1147717
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577512}
parent 897fb666
...@@ -13,4 +13,3 @@ import grit.grit_runner ...@@ -13,4 +13,3 @@ import grit.grit_runner
if __name__ == '__main__': if __name__ == '__main__':
grit.grit_runner.Main(sys.argv[1:]) grit.grit_runner.Main(sys.argv[1:])
...@@ -7,4 +7,3 @@ ...@@ -7,4 +7,3 @@
''' '''
pass pass
...@@ -483,4 +483,3 @@ class MessageClique(object): ...@@ -483,4 +483,3 @@ class MessageClique(object):
language, transl_msg.GetId()) language, transl_msg.GetId())
self.clique[language] = transl_msg self.clique[language] = transl_msg
...@@ -500,4 +500,3 @@ class Translation(BaseMessage): ...@@ -500,4 +500,3 @@ class Translation(BaseMessage):
Returns a copy of this Translation. Returns a copy of this Translation.
""" """
return Translation(None, clone_from=self) return Translation(None, clone_from=self)
...@@ -7,4 +7,3 @@ ...@@ -7,4 +7,3 @@
''' '''
pass pass
...@@ -82,4 +82,3 @@ class RegexpGatherer(skeleton_gatherer.SkeletonGatherer): ...@@ -82,4 +82,3 @@ class RegexpGatherer(skeleton_gatherer.SkeletonGatherer):
if self.single_message_: if self.single_message_:
self.skeleton_.append(self.uberclique.MakeClique(self.single_message_)) self.skeleton_.append(self.uberclique.MakeClique(self.single_message_))
...@@ -742,4 +742,3 @@ class TrHtml(interface.GathererBase): ...@@ -742,4 +742,3 @@ class TrHtml(interface.GathererBase):
continue continue
new_skel.append(chunk) new_skel.append(chunk)
self.skeleton_ = new_skel self.skeleton_ = new_skel
...@@ -31,4 +31,3 @@ class TxtUnittest(unittest.TestCase): ...@@ -31,4 +31,3 @@ class TxtUnittest(unittest.TestCase):
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -621,4 +621,3 @@ class ContentNode(Node): ...@@ -621,4 +621,3 @@ class ContentNode(Node):
'''Convenience baseclass for nodes that can have content.''' '''Convenience baseclass for nodes that can have content.'''
def _ContentType(self): def _ContentType(self):
return self._CONTENT_TYPE_MIXED return self._CONTENT_TYPE_MIXED
...@@ -255,4 +255,3 @@ class NodeUnittest(unittest.TestCase): ...@@ -255,4 +255,3 @@ class NodeUnittest(unittest.TestCase):
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -31,4 +31,3 @@ class WindowsFilenameUnittest(unittest.TestCase): ...@@ -31,4 +31,3 @@ class WindowsFilenameUnittest(unittest.TestCase):
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -116,4 +116,3 @@ class EmitNode(base.ContentNode): ...@@ -116,4 +116,3 @@ class EmitNode(base.ContentNode):
def GetEmitType(self): def GetEmitType(self):
'''Returns the emit_type for this node. Default is 'append'.''' '''Returns the emit_type for this node. Default is 'append'.'''
return self.attrs['emit_type'] return self.attrs['emit_type']
...@@ -58,4 +58,3 @@ def ElementToClass(name, typeattr): ...@@ -58,4 +58,3 @@ def ElementToClass(name, typeattr):
if name not in _ELEMENT_TO_CLASS: if name not in _ELEMENT_TO_CLASS:
raise exception.UnknownElement() raise exception.UnknownElement()
return _ELEMENT_TO_CLASS[name] return _ELEMENT_TO_CLASS[name]
...@@ -356,4 +356,3 @@ class StructureNode(base.Node): ...@@ -356,4 +356,3 @@ class StructureNode(base.Node):
assert hasattr(self, 'gatherer') assert hasattr(self, 'gatherer')
if self.ExpandVariables(): if self.ExpandVariables():
self.gatherer.SubstituteMessages(substituter) self.gatherer.SubstituteMessages(substituter)
...@@ -39,4 +39,3 @@ class SkeletonNode(base.Node): ...@@ -39,4 +39,3 @@ class SkeletonNode(base.Node):
def GetInputPath(self): def GetInputPath(self):
return self.attrs['file'] return self.attrs['file']
...@@ -125,4 +125,3 @@ def PseudoMessage(message): ...@@ -125,4 +125,3 @@ def PseudoMessage(message):
transl.AppendText(PseudoString(part)) transl.AppendText(PseudoString(part))
return transl return transl
...@@ -90,4 +90,3 @@ def GenerateDuplicateShortcutsWarnings(uberclique, tc_project): ...@@ -90,4 +90,3 @@ def GenerateDuplicateShortcutsWarnings(uberclique, tc_project):
for group in groups.values(): for group in groups.values():
warnings += group.GenerateWarnings(tc_project) warnings += group.GenerateWarnings(tc_project)
return warnings return warnings
...@@ -77,4 +77,3 @@ END'''), 'IDD_SIDEBAR_RSS_PANEL_PROPPAGE') ...@@ -77,4 +77,3 @@ END'''), 'IDD_SIDEBAR_RSS_PANEL_PROPPAGE')
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -7,4 +7,3 @@ ...@@ -7,4 +7,3 @@
''' '''
pass pass
...@@ -476,4 +476,3 @@ OPTIONS may be any of the following: ...@@ -476,4 +476,3 @@ OPTIONS may be any of the following:
return value == 'true' return value == 'true'
else: else:
return True return True
...@@ -32,4 +32,3 @@ class CountMessage(interface.Tool): ...@@ -32,4 +32,3 @@ class CountMessage(interface.Tool):
count += 1 count += 1
print "There are %d occurrences of message %s." % (count, id) print "There are %d occurrences of message %s." % (count, id)
...@@ -76,4 +76,3 @@ to being one message for the whole menu.''' ...@@ -76,4 +76,3 @@ to being one message for the whole menu.'''
with util.WrapOutputStream(open(output_file, 'w')) as f: with util.WrapOutputStream(open(output_file, 'w')) as f:
transl2tc.TranslationToTc.WriteTranslations(f, translations) transl2tc.TranslationToTc.WriteTranslations(f, translations)
...@@ -27,6 +27,3 @@ class PostProcessor(object): ...@@ -27,6 +27,3 @@ class PostProcessor(object):
The root node of the processed GRD tree. The root node of the processed GRD tree.
''' '''
raise NotImplementedError() raise NotImplementedError()
...@@ -60,4 +60,3 @@ class DummyPostProcessor(grit.tool.postprocess_interface.PostProcessor): ...@@ -60,4 +60,3 @@ class DummyPostProcessor(grit.tool.postprocess_interface.PostProcessor):
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -23,6 +23,3 @@ class PreProcessor(object): ...@@ -23,6 +23,3 @@ class PreProcessor(object):
The processed text. The processed text.
''' '''
raise NotImplementedError() raise NotImplementedError()
...@@ -46,4 +46,3 @@ END ...@@ -46,4 +46,3 @@ END
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -406,4 +406,3 @@ C preprocessor on the .rc file or manually edit it before using this tool. ...@@ -406,4 +406,3 @@ C preprocessor on the .rc file or manually edit it before using this tool.
except: except:
print 'Exception processing message with text "%s"' % text print 'Exception processing message with text "%s"' % text
raise raise
...@@ -134,4 +134,3 @@ The installation will not proceed if you choose to cancel. ...@@ -134,4 +134,3 @@ The installation will not proceed if you choose to cancel.
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -21,4 +21,3 @@ hence the name :) ...@@ -21,4 +21,3 @@ hence the name :)
print 'Options: %s' % repr(global_options) print 'Options: %s' % repr(global_options)
print 'Arguments: %s' % repr(my_arguments) print 'Arguments: %s' % repr(my_arguments)
return 0 return 0
...@@ -249,4 +249,3 @@ Bulk Translation Upload tool. ...@@ -249,4 +249,3 @@ Bulk Translation Upload tool.
output_file.write(' ') output_file.write(' ')
output_file.write(text) output_file.write(text)
output_file.write('\n') output_file.write('\n')
...@@ -116,4 +116,3 @@ class TestClassNoBase(object): ...@@ -116,4 +116,3 @@ class TestClassNoBase(object):
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -138,4 +138,3 @@ def Parse(xtb_file, callback_function, defs=None, debug=False, ...@@ -138,4 +138,3 @@ def Parse(xtb_file, callback_function, defs=None, debug=False,
xml.sax.parse(xtb_file, handler) xml.sax.parse(xtb_file, handler)
assert handler.language != '' assert handler.language != ''
return handler.language return handler.language
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment