jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/767528 )
Change subject: [IMPR] create configuration dict directly in data_ingestion.py ......................................................................
[IMPR] create configuration dict directly in data_ingestion.py
Change-Id: I8354c058d1e348bf16936345c2800763e3269a59 --- M scripts/data_ingestion.py 1 file changed, 6 insertions(+), 5 deletions(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
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()
pywikibot-commits@lists.wikimedia.org