[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: All kinds of pylint and other style fixes

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

Change subject: All kinds of pylint and other style fixes
..


All kinds of pylint and other style fixes

Change-Id: If368d6a1cff9b282ad9059569708935bfd384aab
---
M scap/plugins/clean.py
M scap/plugins/prep.py
M scap/plugins/updateinterwikicache.py
M scap/plugins/updatewikiversions.py
R scap/plugins/wmfbetaautoupdate.py
5 files changed, 29 insertions(+), 46 deletions(-)

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



diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py
index 520814a..fd4b59e 100644
--- a/scap/plugins/clean.py
+++ b/scap/plugins/clean.py
@@ -1,9 +1,5 @@
 # -*- coding: utf-8 -*-
-"""
-scap.plugins.clean
-~~
-For cleaning up old MediaWiki
-"""
+"""For cleaning up old MediaWiki."""
 import os
 import subprocess
 
@@ -49,13 +45,13 @@
 
 @cli.command('clean')
 class Clean(main.AbstractSync):
-""" Scap sub-command to clean old branches """
+"""Scap sub-command to clean old branches."""
 
 @cli.argument('branch', help='The name of the branch to clean.')
 @cli.argument('--delete', action='store_true',
   help='Delete everything (not just static assets).')
 def main(self, *extra_args):
-""" Clean old branches from the cluster for space savings! """
+"""Clean old branches from the cluster for space savings."""
 self.arguments.message = 'Pruned MediaWiki: %s' % self.arguments.branch
 if not self.arguments.delete:
 self.arguments.message += ' [keeping static files]'
@@ -70,7 +66,7 @@
 
 def cleanup_branch(self, branch, delete):
 """
-Given a branch, go through the cleanup proccess on the master:
+Given a branch, go through the cleanup proccess on the master.
 
 (1) Prune git branches [if deletion]
 (2) Remove l10nupdate cache
diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py
index 513b3e4..043a7ae 100644
--- a/scap/plugins/prep.py
+++ b/scap/plugins/prep.py
@@ -1,9 +1,5 @@
 # -*- coding: utf-8 -*-
-"""
-scap.plugins.prep
-~
-Scap plugin for setting up a new version of MediaWiki for deployment
-"""
+"""Scap plugin for setting up a new version of MediaWiki for deployment."""
 import argparse
 import multiprocessing
 import os
@@ -19,16 +15,16 @@
 
 
 def version_parser(ver):
-"""Validation our version number formats"""
+"""Validate our version number formats."""
 try:
-return re.match("(\d+\.\d+(\.\d+-)?wmf\.?\d+|master)", ver).group(0)
-except:
+return re.match(r"(1\.\d\d\.\d+-wmf\.\d+|master)", ver).group(0)
+except re.error:
 raise argparse.ArgumentTypeError(
 "Branch '%s' does not match required format" % ver)
 
 
 def update_update_strategy(path):
-"""For all submodules, update the merge strategy"""
+"""For all submodules, update the merge strategy."""
 with utils.cd(path):
 base_cmd = '/usr/bin/git -C %s config ' % path
 base_cmd += 'submodule.$name.update rebase'
@@ -37,7 +33,7 @@
 
 
 def write_settings_stub(dest, include):
-"""Write a silly little PHP file that includes another"""
+"""Write a silly little PHP file that includes another."""
 file_stub = (
 'https://gerrit.wikimedia.org/r/399117
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If368d6a1cff9b282ad9059569708935bfd384aab
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: All kinds of pylint and other style fixes

2017-12-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399117 )

Change subject: All kinds of pylint and other style fixes
..

All kinds of pylint and other style fixes

Change-Id: If368d6a1cff9b282ad9059569708935bfd384aab
---
M scap/plugins/clean.py
M scap/plugins/prep.py
M scap/plugins/updateinterwikicache.py
M scap/plugins/updatewikiversions.py
D scap/plugins/wmf-beta-autoupdate.py
5 files changed, 23 insertions(+), 78 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/17/399117/1

diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py
index 520814a..fd4b59e 100644
--- a/scap/plugins/clean.py
+++ b/scap/plugins/clean.py
@@ -1,9 +1,5 @@
 # -*- coding: utf-8 -*-
-"""
-scap.plugins.clean
-~~
-For cleaning up old MediaWiki
-"""
+"""For cleaning up old MediaWiki."""
 import os
 import subprocess
 
@@ -49,13 +45,13 @@
 
 @cli.command('clean')
 class Clean(main.AbstractSync):
-""" Scap sub-command to clean old branches """
+"""Scap sub-command to clean old branches."""
 
 @cli.argument('branch', help='The name of the branch to clean.')
 @cli.argument('--delete', action='store_true',
   help='Delete everything (not just static assets).')
 def main(self, *extra_args):
-""" Clean old branches from the cluster for space savings! """
+"""Clean old branches from the cluster for space savings."""
 self.arguments.message = 'Pruned MediaWiki: %s' % self.arguments.branch
 if not self.arguments.delete:
 self.arguments.message += ' [keeping static files]'
@@ -70,7 +66,7 @@
 
 def cleanup_branch(self, branch, delete):
 """
-Given a branch, go through the cleanup proccess on the master:
+Given a branch, go through the cleanup proccess on the master.
 
 (1) Prune git branches [if deletion]
 (2) Remove l10nupdate cache
diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py
index 513b3e4..043a7ae 100644
--- a/scap/plugins/prep.py
+++ b/scap/plugins/prep.py
@@ -1,9 +1,5 @@
 # -*- coding: utf-8 -*-
-"""
-scap.plugins.prep
-~
-Scap plugin for setting up a new version of MediaWiki for deployment
-"""
+"""Scap plugin for setting up a new version of MediaWiki for deployment."""
 import argparse
 import multiprocessing
 import os
@@ -19,16 +15,16 @@
 
 
 def version_parser(ver):
-"""Validation our version number formats"""
+"""Validate our version number formats."""
 try:
-return re.match("(\d+\.\d+(\.\d+-)?wmf\.?\d+|master)", ver).group(0)
-except:
+return re.match(r"(1\.\d\d\.\d+-wmf\.\d+|master)", ver).group(0)
+except re.error:
 raise argparse.ArgumentTypeError(
 "Branch '%s' does not match required format" % ver)
 
 
 def update_update_strategy(path):
-"""For all submodules, update the merge strategy"""
+"""For all submodules, update the merge strategy."""
 with utils.cd(path):
 base_cmd = '/usr/bin/git -C %s config ' % path
 base_cmd += 'submodule.$name.update rebase'
@@ -37,7 +33,7 @@
 
 
 def write_settings_stub(dest, include):
-"""Write a silly little PHP file that includes another"""
+"""Write a silly little PHP file that includes another."""
 file_stub = (
 'https://gerrit.wikimedia.org/r/399117
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If368d6a1cff9b282ad9059569708935bfd384aab
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 

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