jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/966125 )
Change subject: [taping] add typing hint for BaseSite._locked_pages ......................................................................
[taping] add typing hint for BaseSite._locked_pages
Change-Id: I07cce2ead8eb282384cb5dbac996443566641c3e --- M pywikibot/throttle.py M pywikibot/site/_basesite.py 2 files changed, 14 insertions(+), 5 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py index ea47b94..57a8eab 100644 --- a/pywikibot/site/_basesite.py +++ b/pywikibot/site/_basesite.py @@ -11,7 +11,7 @@ from warnings import warn
import pywikibot -from pywikibot.backports import List, Pattern +from pywikibot.backports import List, Pattern, Set from pywikibot.exceptions import ( Error, FamilyMaintenanceWarning, @@ -95,7 +95,7 @@
# following are for use with lock_page and unlock_page methods self._pagemutex = threading.Condition() - self._locked_pages = set() + self._locked_pages: Set[str] = set()
@property @cached diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py index bb427f0..825bfa3 100644 --- a/pywikibot/throttle.py +++ b/pywikibot/throttle.py @@ -65,13 +65,13 @@ self.mindelay = mindelay or config.minthrottle self.maxdelay = maxdelay or config.maxthrottle self.writedelay = writedelay or config.put_throttle - self.last_read = 0 - self.last_write = 0 + self.last_read = 0.0 + self.last_write = 0.0 self.next_multiplicity = 1.0
self.retry_after = 0 # set by http.request self.delay = 0 - self.checktime = 0 + self.checktime = 0.0 self.modules = Counter()
self.checkMultiplicity()
pywikibot-commits@lists.wikimedia.org