http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10293
Revision: 10293 Author: xqt Date: 2012-06-04 14:02:21 +0000 (Mon, 04 Jun 2012) Log Message: ----------- strip trailing whitespaces
Modified Paths: -------------- branches/rewrite/pywikibot/family.py branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/family.py =================================================================== --- branches/rewrite/pywikibot/family.py 2012-06-04 13:41:38 UTC (rev 10292) +++ branches/rewrite/pywikibot/family.py 2012-06-04 14:02:21 UTC (rev 10293) @@ -25,7 +25,7 @@ # http://meta.wikimedia.org/wiki/Interwiki_sorting_order
# The sorting order by language name from meta - # MediaWiki:Interwiki_config-sorting_order-native-languagename + # MediaWiki:Interwiki_config-sorting_order-native-languagename self.alphabetic = [ 'ace', 'kbd', 'af', 'ak', 'als', 'am', 'ang', 'ab', 'ar', 'an', 'arc', 'roa-rup', 'frp', 'as', 'ast', 'gn', 'av', 'ay', 'az', 'bm', @@ -60,7 +60,7 @@ ]
# The revised sorting order by first word from meta - # MediaWiki:Interwiki_config-sorting_order-native-languagename-firstword + # MediaWiki:Interwiki_config-sorting_order-native-languagename-firstword self.alphabetic_revised = [ 'ace', 'kbd', 'af', 'ak', 'als', 'am', 'ang', 'ab', 'ar', 'an', 'arc', 'roa-rup', 'frp', 'as', 'ast', 'gn', 'av', 'ay', 'az', 'bjn',
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2012-06-04 13:41:38 UTC (rev 10292) +++ branches/rewrite/pywikibot/site.py 2012-06-04 14:02:21 UTC (rev 10293) @@ -680,16 +680,16 @@ """ if not hasattr(self, "_userinfo"): return False - + if sysop and 'sysop' not in self.userinfo['groups']: return False - + if not self.userinfo['name']: return False - + if self.userinfo['name'] != self._username[sysop]: pywikibot.warning("Logged in as %s instead of %s" % (self.userinfo['name'], self._username[sysop])) - + return True
@deprecated("Site.user()") @@ -2885,7 +2885,7 @@
""" # TODO: update docstring - + # N.B. API still provides no way to access Special:Newpages content # directly, so we get new pages indirectly through 'recentchanges'
@@ -2913,7 +2913,7 @@
N.B. the API does not provide direct access to Special:Newimages, so this is derived from the "upload" log events instead. - + """ #TODO: update docstring for event in logevents(self, logtype="upload", user=user, @@ -3028,7 +3028,7 @@ gqppage="Uncategorizedpages", step=step, total=total) return upgen - + @deprecate_arg("number", None) @deprecate_arg("repeat", None) def uncategorizedtemplates(self, number=None, repeat=True,
pywikipedia-svn@lists.wikimedia.org