List of steps to reproduce:
SiteInfo is a container but the in operator does not work as expected with the key is not already preloaded:
import pywikibot s = pywikibot.Site() 'dbrepllag' in s.siteinfo False s.siteinfo['dbrepllag'] [{'host': 'db1144:3315', 'lag': 0.493909}] 'dbrepllag' in s.siteinfo True
What should have happened instead?:
'dbrepllag' in s.siteinfo should return True even it is not preloaded:
import pywikibot s = pywikibot.Site() 'dbrepllag' in s.siteinfo True s.siteinfo['dbrepllag'] [{'host': 'db1144:3315', 'lag': 0.493909}] 'dbrepllag' in s.siteinfo True
Software version:
Pywikibot 3.0.20190430+