jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/919455 )

Change subject: [IMPR] json.loads(json_file.read()) can be replaced with 
json.load(json_file)
......................................................................

[IMPR] json.loads(json_file.read()) can be replaced with json.load(json_file)

Change-Id: I781c3e32d2da6ccf4164a53d60d00c15f43ef58e
---
M scripts/maintenance/make_i18n_dict.py
1 file changed, 11 insertions(+), 2 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/scripts/maintenance/make_i18n_dict.py 
b/scripts/maintenance/make_i18n_dict.py
index ce457e0..a9d806d 100755
--- a/scripts/maintenance/make_i18n_dict.py
+++ b/scripts/maintenance/make_i18n_dict.py
@@ -28,7 +28,7 @@
 >>> bot.to_json()
 """
 #
-# (C) Pywikibot team, 2013-2022
+# (C) Pywikibot team, 2013-2023
 #
 # Distributed under the terms of the MIT license.
 #
@@ -140,7 +140,7 @@
             file_name = os.path.join(json_dir, f'{lang}.json')
             if os.path.isfile(file_name):
                 with codecs.open(file_name, 'r', 'utf-8') as json_file:
-                    new_dict = json.loads(json_file.read())
+                    new_dict = json.load(json_file)
             else:
                 new_dict = {}
             new_dict['@metadata'] = new_dict.get('@metadata', {'authors': []})

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/919455
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I781c3e32d2da6ccf4164a53d60d00c15f43ef58e
Gerrit-Change-Number: 919455
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.w...@aol.com>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org

Reply via email to