http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11004
Revision: 11004 Author: xqt Date: 2013-01-27 14:13:12 +0000 (Sun, 27 Jan 2013) Log Message: ----------- remove default code, some PEP8
Modified Paths: -------------- trunk/pywikipedia/families/wikibooks_family.py trunk/pywikipedia/families/wikinews_family.py trunk/pywikipedia/families/wikipedia_family.py trunk/pywikipedia/families/wikiquote_family.py trunk/pywikipedia/families/wikisource_family.py trunk/pywikipedia/families/wikiversity_family.py trunk/pywikipedia/families/wikivoyage_family.py trunk/pywikipedia/families/wiktionary_family.py
Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wikibooks_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -21,7 +21,8 @@ 'ku', 'uz', ]
- self.langs = dict([(lang, '%s.wikibooks.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikibooks.org' % lang) + for lang in self.languages_by_size])
# Override defaults self.namespaces[14]['en'] = [u'Category', u'CAT']
Modified: trunk/pywikipedia/families/wikinews_family.py =================================================================== --- trunk/pywikipedia/families/wikinews_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wikinews_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -16,7 +16,8 @@ 'bg', 'sq', 'uk', 'no', 'ko', 'bs', 'eo', ]
- self.langs = dict([(lang, '%s.wikinews.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikinews.org' % lang) + for lang in self.languages_by_size])
# Override defaults self.namespaces[14]['en'] = [u'Category', u'CAT'] @@ -257,9 +258,6 @@ 'zh-cn': 'zh' }
- def code2encoding(self, code): - return 'utf-8' - if family.config.SSL_connection:
def protocol(self, code):
Modified: trunk/pywikipedia/families/wikipedia_family.py =================================================================== --- trunk/pywikipedia/families/wikipedia_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wikipedia_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -41,7 +41,8 @@ 'ff', 'st', 'tw', 'xh', ]
- self.langs = dict([(lang, '%s.wikipedia.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikipedia.org' % lang) + for lang in self.languages_by_size])
# Override defaults self.namespaces[2]['cs'] = [u'Wikipedista', u'Uživatel', u'Wikipedistka']
Modified: trunk/pywikipedia/families/wikiquote_family.py =================================================================== --- trunk/pywikipedia/families/wikiquote_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wikiquote_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -20,7 +20,8 @@ 'ky', 'am', ]
- self.langs = dict([(lang, '%s.wikiquote.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikiquote.org' % lang) + for lang in self.languages_by_size])
# Override defaults self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板']
Modified: trunk/pywikipedia/families/wikisource_family.py =================================================================== --- trunk/pywikipedia/families/wikisource_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wikisource_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -19,8 +19,8 @@ 'lt', 'kn', 'cy', 'sk', 'zh-min-nan', 'fo', ]
- for lang in self.languages_by_size: - self.langs[lang] = '%s.wikisource.org' % lang + self.langs = dict([(lang, '%s.wikisource.org' % lang) + for lang in self.languages_by_size]) self.langs['-'] = 'wikisource.org'
# Override defaults
Modified: trunk/pywikipedia/families/wikiversity_family.py =================================================================== --- trunk/pywikipedia/families/wikiversity_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wikiversity_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -15,7 +15,8 @@ 'el', 'sv', 'sl', 'ja', ]
- self.langs = dict([(lang, '%s.wikiversity.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikiversity.org' % lang) + for lang in self.languages_by_size])
# Override defaults
Modified: trunk/pywikipedia/families/wikivoyage_family.py =================================================================== --- trunk/pywikipedia/families/wikivoyage_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wikivoyage_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -87,9 +87,6 @@ 'commons', 'species', ]
- def scriptpath(self, code): - return u'/w' - if family.config.SSL_connection:
def protocol(self, code):
Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2013-01-27 14:12:27 UTC (rev 11003) +++ trunk/pywikipedia/families/wiktionary_family.py 2013-01-27 14:13:12 UTC (rev 11004) @@ -27,7 +27,8 @@ 'dv', 'tn', 'ne', 'ha', 'ks', 'ay', 'ts', ]
- self.langs = dict([(lang, '%s.wiktionary.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wiktionary.org' % lang) + for lang in self.languages_by_size])
# Override defaults self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] @@ -561,14 +562,6 @@ 'ko': u'미주알고주알 토론', }
- self.namespaces[112] = { - # 'en': u'WT', - } - - self.namespaces[113] = { - # 'en': u'WT talk', - } - self.namespaces[114] = { 'en': u'Citations', }
pywikipedia-svn@lists.wikimedia.org