jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1050741?usp=email )

Change subject: [bugfix] Fix code within f-string
......................................................................

[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(-)

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




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 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1050741?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iec64a30651f119e582bcf041ab816ce286c9530e
Gerrit-Change-Number: 1050741
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to