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

Unified Diff: src/report/report.py

Issue 1646623004: Removed custom formatter for make_warning. Resolves #23. (Closed) Base URL: git@github.com:chromium/caterpillar.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/report/report.py
diff --git a/src/report/report.py b/src/report/report.py
index 1448e0eed137c7ca344174c02eb489afc519b0be..05b962fcb3ab56900cecb46b97d5cca133f447f4 100644
--- a/src/report/report.py
+++ b/src/report/report.py
@@ -194,7 +194,7 @@ def generate_not_polyfilled(ca_manifest, apis, pwa_path, ignore_dirs):
)
-def make_warning(name, member, text, apis, formatter=None):
+def make_warning(name, member, text, apis):
"""Generates a warning dictionary.
Args:
@@ -204,17 +204,13 @@ def make_warning(name, member, text, apis, formatter=None):
text: Text of warning.
apis: Dictionary mapping Chrome Apps API name to polyfill manifest
dictionaries.
- formatter: A function to pass the warning text through before returning.
Returns:
Warning dictionary of form {'member': member name e.g onChanged.addListener,
'text': warning text}.
"""
full_text = 'chrome.{}.{}: {}'.format(name, member, text)
- if formatter:
- formatted_text = formatter(full_text)
- else:
- formatted_text = format_html(full_text, apis)
+ formatted_text = format_html(full_text, apis)
return {'member': member, 'text': formatted_text}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698