jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[bugfix] Fix code within f-string

Bug: T368837
Change-Id: Iec64a30651f119e582bcf041ab816ce286c9530e
---
M pywikibot/backports.py
M tests/tools_deprecate_tests.py
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pywikibot/backports.py b/pywikibot/backports.py
index 815f7d3..76f8162 100644
--- a/pywikibot/backports.py
+++ b/pywikibot/backports.py
@@ -185,7 +185,7 @@
msg = 'batched(): incomplete batch'
if PYTHON_VERSION < (3, 12):
if not isinstance(n, int):
- raise TypeError(f'{type(n),__name__!r} object cannot be'
+ raise TypeError(f'{type(n).__name__!r} object cannot be'
' interpreted as an integer')
group = []
for item in iterable:
diff --git a/tests/tools_deprecate_tests.py b/tests/tools_deprecate_tests.py
index 582a973..c54dc84 100755
--- a/tests/tools_deprecate_tests.py
+++ b/tests/tools_deprecate_tests.py
@@ -473,7 +473,7 @@

def test_deprecate_and_remove_function_args(self):
"""Test @deprecated and removed function argument."""
- deprecation_msg = f' argument of {__name__ }.deprecated_func_arg3'
+ deprecation_msg = f' argument of {__name__}.deprecated_func_arg3'
rv = deprecated_func_arg3()
self.assertIsNone(rv)
self.assertNoDeprecation()

To view, visit change 1050741. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iec64a30651f119e582bcf041ab816ce286c9530e
Gerrit-Change-Number: 1050741
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot