Merlijn van Deen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76343
Change subject: Expand all Text for Checking Hidden Categories
......................................................................
Expand all Text for Checking Hidden Categories
An example of this issue is [1] which has a template that actually adds the
_HIDDEN_ keyword. The other change proposed here is not to use regular
expressions for that match, it is pointless.
[1] http://commons.wikimedia.org/wiki/Category:Cultural_heritage_monuments_in_P…
Change-Id: I4d1acce3c3c311724a577435829630c8e2548581
---
M pywikibot/page.py
1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/43/76343/1
diff --git a/pywikibot/page.py b/pywikibot/page.py
index d34a5c6..215b643 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1844,9 +1844,12 @@
def isHiddenCategory(self):
"""Return True if the category is hidden."""
- text = self.get()
- hidden = re.search('__HIDDENCAT__', text)
- return bool(hidden)
+ # FIXME
+ # This should use action=query&list=allcategories
+ # setting acfrom and acto to the category title and adding
+ # acprop=hidden but currently fails in some cases
+ # (see bug 48824)
+ return '__HIDDENCAT__' in self.expand_text()
def copyTo(self, cat, message):
"""
--
To view, visit https://gerrit.wikimedia.org/r/76343
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d1acce3c3c311724a577435829630c8e2548581
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)gmail.com>
Gerrit-Reviewer: DMaggot <david.narvaez(a)computer.org>
Hello PywikibotCommitWatcher,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/76318
to review the following change.
Change subject: improvement; add '.gitattributes' file in order to re-enable some $Id$ support
......................................................................
improvement; add '.gitattributes' file in order to re-enable some $Id$ support
Change-Id: I048cecae3ffa2f16c1500d0b7a95bd30ea551dec
---
A .gitattributes
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/18/76318/1
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..274c91d
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.py ident
--
To view, visit https://gerrit.wikimedia.org/r/76318
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I048cecae3ffa2f16c1500d0b7a95bd30ea551dec
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <dr.trigon(a)surfeu.ch>
Gerrit-Reviewer: PywikibotCommitWatcher <pywikibot-commits(a)lists.wikimedia.org>