[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Code cleanup

2017-06-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358000 )

Change subject: Code cleanup
..


Code cleanup

- Remove deprecated method which is no longer used.
  It is not needed to deprecate it for scripts which isn't derived anywhere.

Change-Id: I51c6492eef82af9f68b730d941797ad7f148d079
---
M scripts/checkimages.py
1 file changed, 1 insertion(+), 9 deletions(-)

Approvals:
  Mpaa: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 10f6599..7b22ade 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -102,7 +102,7 @@
 
 from pywikibot.exceptions import ArgumentDeprecationWarning, NotEmailableError
 from pywikibot.family import Family
-from pywikibot.tools import deprecated, issue_deprecation_warning, StringTypes
+from pywikibot.tools import issue_deprecation_warning
 
 ###
 # <--- Change only below! --->#
@@ -828,14 +828,6 @@
 # find the oldest image
 sec, image = max(listGiven, key=lambda element: element[0])
 return image
-
-@deprecated('Page.revision_count()')
-def countEdits(self, pagename, userlist):
-"""Function to count the edit of a user or a list of users in a 
page."""
-if isinstance(userlist, StringTypes):
-userlist = [userlist]
-page = pywikibot.Page(self.site, pagename)
-return page.revision_count(userlist)
 
 def checkImageOnCommons(self):
 """Checking if the file is on commons."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51c6492eef82af9f68b730d941797ad7f148d079
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Code cleanup

2017-06-09 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358000 )

Change subject: Code cleanup
..

Code cleanup

- Remove deprecated method which is no longer used.
  It is not needed to deprecate it for scripts which isn't derived anywhere.

Change-Id: I51c6492eef82af9f68b730d941797ad7f148d079
---
M scripts/checkimages.py
1 file changed, 0 insertions(+), 8 deletions(-)


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

diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 10f6599..6c68ffd 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -829,14 +829,6 @@
 sec, image = max(listGiven, key=lambda element: element[0])
 return image
 
-@deprecated('Page.revision_count()')
-def countEdits(self, pagename, userlist):
-"""Function to count the edit of a user or a list of users in a 
page."""
-if isinstance(userlist, StringTypes):
-userlist = [userlist]
-page = pywikibot.Page(self.site, pagename)
-return page.revision_count(userlist)
-
 def checkImageOnCommons(self):
 """Checking if the file is on commons."""
 pywikibot.output(u'Checking if [[%s]] is on commons...'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51c6492eef82af9f68b730d941797ad7f148d079
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits