jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/615448 )
Change subject: [4.0] remove Python 2 code parts in generate_user_files.py ......................................................................
[4.0] remove Python 2 code parts in generate_user_files.py
Change-Id: I3f74db4dab1bbf03f3929ca9b09971465abdfd1e --- M generate_user_files.py 1 file changed, 2 insertions(+), 6 deletions(-)
Approvals: Matěj Suchánek: Looks good to me, approved jenkins-bot: Verified
diff --git a/generate_user_files.py b/generate_user_files.py index e9657df..701b670 100755 --- a/generate_user_files.py +++ b/generate_user_files.py @@ -6,20 +6,16 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, division, unicode_literals - import codecs -from collections import namedtuple import os import re import sys
+from collections import namedtuple from textwrap import fill
from generate_family_file import _import_with_no_user_config
-if sys.version_info[0] == 2: - from future_builtins import filter
# DISABLED_SECTIONS cannot be copied; variables must be set manually DISABLED_SECTIONS = {'USER INTERFACE SETTINGS', # uses sys @@ -135,7 +131,7 @@ else: known_langs = []
- if len(known_langs) == 0: + if not known_langs: pywikibot.output('There were no known languages found in {}.' .format(fam.name)) default_lang = None
pywikibot-commits@lists.wikimedia.org