Skip to content

Commit

Permalink
[bugfix] Fix code within f-string
Browse files Browse the repository at this point in the history
Bug: T368837
Change-Id: Iec64a30651f119e582bcf041ab816ce286c9530e
  • Loading branch information
xqt committed Jun 29, 2024
1 parent 36a0ef8 commit d22af4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pywikibot/backports.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def batched(iterable, n: int, *,
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:
Expand Down
2 changes: 1 addition & 1 deletion tests/tools_deprecate_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def tests(func):

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()
Expand Down

0 comments on commit d22af4e

Please sign in to comment.