jenkins-bot submitted this change.
[IMPR] create configuration dict directly in data_ingestion.py
Change-Id: I8354c058d1e348bf16936345c2800763e3269a59
---
M scripts/data_ingestion.py
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py
index b276e37..f8b27cb 100755
--- a/scripts/data_ingestion.py
+++ b/scripts/data_ingestion.py
@@ -260,17 +260,18 @@
:param configuration_page: page with configuration
:type configuration_page: :py:obj:`pywikibot.Page`
"""
- configuration = {}
# Set a bunch of defaults
- configuration['csvDialect'] = 'excel'
- configuration['csvDelimiter'] = ';'
- configuration['csvEncoding'] = 'Windows-1252' # FIXME: Encoding hell
+ configuration = {
+ 'csvDialect': 'excel',
+ 'csvDelimiter': ';',
+ 'csvEncoding': 'Windows-1252', # FIXME: Encoding hell
+ }
templates = configuration_page.templatesWithParams()
for (template, params) in templates:
if template.title(with_ns=False) == 'Data ingestion':
for param in params:
- (field, sep, value) = param.partition('=')
+ field, _, value = param.partition('=')
# Remove leading or trailing spaces
field = field.strip()
To view, visit change 767528. To unsubscribe, or for help writing mail filters, visit settings.