jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/920321 )
Change subject: [doc] Remove outdated basestring type hints ......................................................................
[doc] Remove outdated basestring type hints
Change-Id: I7f8b92b28a04fd9b56d8d25ca00d28eabd9f1c85 --- M pywikibot/textlib.py 1 file changed, 11 insertions(+), 9 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 7439253..ce63410 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -1,8 +1,4 @@ -"""Functions for manipulating wiki-text. - -Unless otherwise noted, all functions take a unicode string as the -argument and return a unicode string. -""" +"""Functions for manipulating wiki-text.""" # # (C) Pywikibot team, 2008-2023 # @@ -655,8 +651,7 @@
If it's a string and the replacement was a sequence it converts it into a Page instance. If the replacement is done via a callable it'll use it like - unlinking and directly replace the link with the text itself. It only - supports unicode when used by the callable and bytes are not allowed. + unlinking and directly replace the link with the text itself.
If either the section or label should be used the replacement can be a function which returns a Link instance and copies the value which should @@ -815,8 +810,6 @@ new_link = new_label
if isinstance(new_link, str): - # Nothing good can come out of the fact that bytes is returned so - # force unicode text = text[:start] + new_link + text[end:] # Make sure that next time around we will not find this same hit. curpos = start + len(new_link)
pywikibot-commits@lists.wikimedia.org