Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packagerChrome.py

Issue 29756673: Noissue - Adapt best practices for trailing commas (buildtools) (Closed)
Patch Set: Re-run script on Python 2, added flake8-commas extension Created April 19, 2018, 2:09 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « localeTools.py ('k') | packagerEdge.py » ('j') | tox.ini » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerChrome.py
===================================================================
--- a/packagerChrome.py
+++ b/packagerChrome.py
@@ -64,7 +64,7 @@
template = getTemplate(template_name, autoEscape=True)
return template.render(
basename=params['metadata'].get('general', 'basename'),
- scripts=params['metadata'].get(*script_option).split()
+ scripts=params['metadata'].get(*script_option).split(),
).encode('utf-8')
@@ -144,7 +144,7 @@
def toJson(data):
return json.dumps(
data, ensure_ascii=False, sort_keys=True,
- indent=2, separators=(',', ': ')
+ indent=2, separators=(',', ': '),
).encode('utf-8') + '\n'
@@ -153,7 +153,7 @@
info_templates = {
'chrome': 'chromeInfo.js.tmpl',
'edge': 'edgeInfo.js.tmpl',
- 'gecko': 'geckoInfo.js.tmpl'
+ 'gecko': 'geckoInfo.js.tmpl',
}
# Historically we didn't use relative paths when requiring modules, so in
@@ -166,7 +166,7 @@
info_template = getTemplate(info_templates[params['type']])
info_module = info_template.render(
basename=params['metadata'].get('general', 'basename'),
- version=params['version']
+ version=params['version'],
).encode('utf-8')
configuration = {
@@ -195,7 +195,7 @@
glob.glob(os.path.join(qunit_path, 'tests', '*.js')))
configuration['bundles'].append({
'bundle_name': 'qunit/tests.js',
- 'entry_points': qunit_files
+ 'entry_points': qunit_files,
})
cmd = ['node', os.path.join(os.path.dirname(__file__), 'webpack_runner.js')]
@@ -339,7 +339,7 @@
if metadata.has_option('general', 'testScripts'):
files['qunit/index.html'] = createScriptPage(
- params, 'testIndex.html.tmpl', ('general', 'testScripts')
+ params, 'testIndex.html.tmpl', ('general', 'testScripts'),
)
@@ -374,7 +374,7 @@
if metadata.has_section('preprocess'):
files.preprocess(
[f for f, _ in metadata.items('preprocess')],
- {'needsExt': True}
+ {'needsExt': True},
)
if metadata.has_section('import_locales'):
« no previous file with comments | « localeTools.py ('k') | packagerEdge.py » ('j') | tox.ini » ('J')

Powered by Google App Engine
This is Rietveld