jenkins-bot submitted this change.
[fix] solve some deepsource bug issues
- use Site.title()with with_ns parameter instead of withNamespace
- use Thread.is_set instead of deprecated isSet method
Change-Id: Ic62bd4244eef6a55f2b96c2d79cb927df5053ba4
---
M pywikibot/tools/__init__.py
M scripts/commons_information.py
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 981a488..ec381a2 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -634,7 +634,7 @@
def __iter__(self):
"""Iterate results from the queue."""
- if not self.is_alive() and not self.finished.isSet():
+ if not self.is_alive() and not self.finished.is_set():
self.start()
# if there is an item in the queue, yield it, otherwise wait
while not self.finished.is_set():
diff --git a/scripts/commons_information.py b/scripts/commons_information.py
index ac64b5b..616c704 100755
--- a/scripts/commons_information.py
+++ b/scripts/commons_information.py
@@ -74,8 +74,8 @@
'was found, but langdetect thinks {after!r} is the '
'most appropriate with a probability of {prob}:'
'\03{{default}}\n{text}'
- .format(before=tmp_page.title(withNamespace=False),
- after=tmp_page2.title(withNamespace=False),
+ .format(before=tmp_page.title(with_ns=False),
+ after=tmp_page2.title(with_ns=False),
prob=langs[0].prob,
text=lang_tmp_val))
choice = pywikibot.input_choice(
To view, visit change 750728. To unsubscribe, or for help writing mail filters, visit settings.