[flake8] Fix C407 flake8 issue
[flake8] Fix C407 flake8 issue

use a generator instead a list inside filter

Change-Id: Ie174ca5f8acdae59f98a70df860b24b7f414d53c

PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core,wikimedia/pywikibot-core