Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/320100

Change subject: [DOC] site.allpages parameters start and prefix must be a 
basestring
......................................................................

[DOC] site.allpages parameters start and prefix must be a basestring

- add type to the doc string
- verify it for the start parameter which is mandatory

Change-Id: I03c7a8701d7d3f84fe7e5e95b5caf60dec4044ad
---
M pywikibot/site.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/00/320100/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 780b48b..db79339 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4012,7 +4012,9 @@
         """Iterate pages in a single namespace.
 
         @param start: Start at this title (page need not exist).
+        @type start: str
         @param prefix: Only yield pages starting with this string.
+        @type prefix: str
         @param namespace: Iterate pages from this (single) namespace
         @type namespace: int or Namespace.
         @param filterredir: if True, only yield redirects; if False (and not
@@ -4050,6 +4052,7 @@
             warn('The value "{0!r}" for "filterredir" is deprecated; use '
                  '{1} instead.'.format(old, filterredir), DeprecationWarning, 
3)
 
+        assert isinstance(start, basestring), 'start parameter must be str 
type'
         apgen = self._generator(api.PageGenerator, type_arg="allpages",
                                 namespaces=namespace,
                                 gapfrom=start, total=total,

-- 
To view, visit https://gerrit.wikimedia.org/r/320100
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03c7a8701d7d3f84fe7e5e95b5caf60dec4044ad
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to