commit: c6443ac6d71f9de6afb0c25650548a2b9d482896 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sat Sep 27 02:00:19 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Tue Sep 30 00:42:27 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c6443ac6
Sync: Update __init__.py docstrings to use a variable Same as for the emaint modules, level 2 python optimization removes docstrings. --- pym/portage/emaint/modules/sync/__init__.py | 9 ++++----- pym/portage/sync/modules/cvs/__init__.py | 11 +++++------ pym/portage/sync/modules/git/__init__.py | 11 +++++------ pym/portage/sync/modules/rsync/__init__.py | 11 +++++------ pym/portage/sync/modules/svn/__init__.py | 11 +++++------ pym/portage/sync/modules/websync/__init__.py | 11 ++++++----- 6 files changed, 30 insertions(+), 34 deletions(-) diff --git a/pym/portage/emaint/modules/sync/__init__.py b/pym/portage/emaint/modules/sync/__init__.py index 4070200..32469b5 100644 --- a/pym/portage/emaint/modules/sync/__init__.py +++ b/pym/portage/emaint/modules/sync/__init__.py @@ -1,18 +1,17 @@ # Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -"""Check repos.conf settings and sync repositories. -""" - +doc = """Check repos.conf settings and sync repositories.""" +__doc__ = doc[:] module_spec = { 'name': 'sync', - 'description': __doc__, + 'description': doc, 'provides':{ 'sync-module': { 'name': "sync", 'class': "SyncRepos", - 'description': __doc__, + 'description': doc, 'functions': ['allrepos', 'auto', 'repo'], 'func_desc': { 'repo': { diff --git a/pym/portage/sync/modules/cvs/__init__.py b/pym/portage/sync/modules/cvs/__init__.py index fd3b12a..abf547f 100644 --- a/pym/portage/sync/modules/cvs/__init__.py +++ b/pym/portage/sync/modules/cvs/__init__.py @@ -1,10 +1,9 @@ # Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -"""CVS plug-in module for portage. -Performs a cvs up on repositories -""" - +doc = """CVS plug-in module for portage. +Performs a cvs up on repositories.""" +__doc__ = doc[:] from portage.localization import _ from portage.sync.config_checks import CheckSyncConfig @@ -27,12 +26,12 @@ class CheckCVSConfig(CheckSyncConfig): module_spec = { 'name': 'cvs', - 'description': __doc__, + 'description': doc, 'provides':{ 'cvs-module': { 'name': "cvs", 'class': "CVSSync", - 'description': __doc__, + 'description': doc, 'functions': ['sync', 'new', 'exists'], 'func_desc': { 'sync': 'Performs a cvs up on the repository', diff --git a/pym/portage/sync/modules/git/__init__.py b/pym/portage/sync/modules/git/__init__.py index 304142e..833b389 100644 --- a/pym/portage/sync/modules/git/__init__.py +++ b/pym/portage/sync/modules/git/__init__.py @@ -1,22 +1,21 @@ # Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -"""Git plug-in module for portage. -Performs a git pull on repositories -""" - +doc = """Git plug-in module for portage. +Performs a git pull on repositories.""" +__doc__ = doc[:] from portage.sync.config_checks import CheckSyncConfig module_spec = { 'name': 'git', - 'description': __doc__, + 'description': doc, 'provides':{ 'git-module': { 'name': "git", 'class': "GitSync", - 'description': __doc__, + 'description': doc, 'functions': ['sync', 'new', 'exists'], 'func_desc': { 'sync': 'Performs a git pull on the repository', diff --git a/pym/portage/sync/modules/rsync/__init__.py b/pym/portage/sync/modules/rsync/__init__.py index 9e19d85..9adc4c8 100644 --- a/pym/portage/sync/modules/rsync/__init__.py +++ b/pym/portage/sync/modules/rsync/__init__.py @@ -1,22 +1,21 @@ # Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -"""Rsync plug-in module for portage. - Performs rsync transfers on repositories -""" - +doc = """Rsync plug-in module for portage. + Performs rsync transfers on repositories.""" +__doc__ = doc[:] from portage.sync.config_checks import CheckSyncConfig module_spec = { 'name': 'rsync', - 'description': __doc__, + 'description': doc, 'provides':{ 'rsync-module': { 'name': "rsync", 'class': "RsyncSync", - 'description': __doc__, + 'description': doc, 'functions': ['sync', 'new', 'exists'], 'func_desc': { 'sync': 'Performs rsync transfers on the repository', diff --git a/pym/portage/sync/modules/svn/__init__.py b/pym/portage/sync/modules/svn/__init__.py index 1fda55a..59ab950 100644 --- a/pym/portage/sync/modules/svn/__init__.py +++ b/pym/portage/sync/modules/svn/__init__.py @@ -1,10 +1,9 @@ # Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -"""SVN plug-in module for portage. -Performs a svn up on repositories -""" - +doc = """SVN plug-in module for portage. +Performs a svn up on repositories.""" +__doc__ = doc[:] from portage.localization import _ from portage.sync.config_checks import CheckSyncConfig @@ -13,12 +12,12 @@ from portage.util import writemsg_level module_spec = { 'name': 'svn', - 'description': __doc__, + 'description': doc, 'provides':{ 'svn-module': { 'name': "svn", 'class': "SVNSync", - 'description': __doc__, + 'description': doc, 'functions': ['sync', 'new', 'exists'], 'func_desc': { 'sync': 'Performs a svn up on the repository', diff --git a/pym/portage/sync/modules/websync/__init__.py b/pym/portage/sync/modules/websync/__init__.py index e93ee10..0404610 100644 --- a/pym/portage/sync/modules/websync/__init__.py +++ b/pym/portage/sync/modules/websync/__init__.py @@ -1,10 +1,11 @@ # Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -"""WebRSync plug-in module for portage. +doc = """WebRSync plug-in module for portage. Performs a http download of a portage snapshot, verifies and -unpacks it to the repo location. -""" +unpacks it to the repo location.""" +__doc__ = doc[:] + import os @@ -27,12 +28,12 @@ except KeyError: module_spec = { 'name': 'webrsync', - 'description': __doc__, + 'description': doc, 'provides':{ 'websync-module': { 'name': "websync", 'class': config_class, - 'description': __doc__, + 'description': doc, 'functions': ['sync', 'new', 'exists'], 'func_desc': { 'sync': 'Performs an archived http download of the ' +