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

Unified Diff: third_party/logilab/common/ureports/__init__.py

Issue 753543006: pylint: upgrade to 1.4.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « third_party/logilab/common/pytest.py ('k') | third_party/logilab/common/ureports/text_writer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/logilab/common/ureports/__init__.py
diff --git a/third_party/logilab/common/ureports/__init__.py b/third_party/logilab/common/ureports/__init__.py
index 65e9641bb3740510d4e746f2f1f307bbb81e0245..d76ebe52edfdec9420b2e0ffbe2acdf53137d7df 100644
--- a/third_party/logilab/common/ureports/__init__.py
+++ b/third_party/logilab/common/ureports/__init__.py
@@ -42,13 +42,13 @@ def layout_title(layout):
"""
for child in layout.children:
if isinstance(child, Title):
- return ' '.join([node.data for node in get_nodes(child, Text)])
+ return u' '.join([node.data for node in get_nodes(child, Text)])
def build_summary(layout, level=1):
"""make a summary for the report, including X level"""
assert level > 0
level -= 1
- summary = List(klass='summary')
+ summary = List(klass=u'summary')
for child in layout.children:
if not isinstance(child, Section):
continue
@@ -57,7 +57,7 @@ def build_summary(layout, level=1):
continue
if not child.id:
child.id = label.replace(' ', '-')
- node = Link('#'+child.id, label=label or child.id)
+ node = Link(u'#'+child.id, label=label or child.id)
# FIXME: Three following lines produce not very compliant
# docbook: there are some useless <para><para>. They might be
# replaced by the three commented lines but this then produces
@@ -99,7 +99,7 @@ class BaseWriter(object):
for child in getattr(layout, 'children', ()):
child.accept(self)
- def writeln(self, string=''):
+ def writeln(self, string=u''):
"""write a line in the output buffer"""
self.write(string + linesep)
@@ -132,7 +132,7 @@ class BaseWriter(object):
result[-1].append(cell)
# fill missing cells
while len(result[-1]) < cols:
- result[-1].append('')
+ result[-1].append(u'')
return result
def compute_content(self, layout):
@@ -147,7 +147,7 @@ class BaseWriter(object):
stream.write(data)
except UnicodeEncodeError:
stream.write(data.encode(self.encoding))
- def writeln(data=''):
+ def writeln(data=u''):
try:
stream.write(data+linesep)
except UnicodeEncodeError:
« no previous file with comments | « third_party/logilab/common/pytest.py ('k') | third_party/logilab/common/ureports/text_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698