jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/774003 )
Change subject: [IMPR] simplify expression in Coordinate class ......................................................................
[IMPR] simplify expression in Coordinate class
Change-Id: I21b324b80cf6cacec1e52877da44a549172c2b65 --- M pywikibot/__init__.py 1 file changed, 1 insertion(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 591b58f..4456faa 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -291,10 +291,7 @@ globe = None
if data['globe']: - globes = {} - for name, entity in site.globes().items(): - globes[entity] = name - + globes = {entity: name for name, entity in site.globes().items()} globe = globes.get(data['globe'])
return cls(data['latitude'], data['longitude'],
pywikibot-commits@lists.wikimedia.org