BaseBot passes generator option to its OptionHandler if a generator method or property is already given.
For example:
import pywikibot
class myBot(pywikibot.bot.BaseBot):
@property
def generator(self):
return
yield
bot = myBot(generator='abs')shows two warnings:
WARNING: <pyshell#27>:1: UserWarning: myBot has a generator already. Ignoring argument. WARNING: generator is not a valid option. It was ignored.
The second comes from OptionHandler super class because the generator argument is ignored but not removed from kwargs dict.