From f89ba50dae24069b6a3484de0f590630b98c8cdb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Fri, 29 Jul 2011 18:10:25 +0200 Subject: [PATCH] Fix some epydoc warnings Git-Dch: Ignore --- gbp/command_wrappers.py | 4 +++- gbp/config.py | 12 ++++++------ gbp/deb.py | 9 ++++----- gbp/git.py | 14 +++++++++----- git-import-orig | 18 +++++++++--------- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index 49fc966..59d1d8a 100644 --- a/gbp/command_wrappers.py +++ b/gbp/command_wrappers.py @@ -301,7 +301,9 @@ def copy_from(orig_dir, filters=[]): """ copy a source tree over via tar @param orig_dir: where to copy from - @param exclude: tar exclude pattern + @type orig_dir: string + @param filters: tar exclude pattern + @type filters: list of strings @return: list of copied files @rtype: list """ diff --git a/gbp/config.py b/gbp/config.py index be20784..d4694b0 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -259,11 +259,11 @@ class GbpOptionParser(OptionParser): def add_config_file_option(self, option_name, dest, help=None, **kwargs): """ set a option for the command line parser, the default is read from the config file - @var option_name: name of the option + @param option_name: name of the option @type option_name: string - @var dest: where to store this option + @param dest: where to store this option @type dest: string - @var help: help text + @param help: help text @type help: string """ if not help: @@ -281,11 +281,11 @@ class GbpOptionGroup(OptionGroup): def add_config_file_option(self, option_name, dest, help=None, **kwargs): """ set a option for the command line parser, the default is read from the config file - @var option_name: name of the option + @param option_name: name of the option @type option_name: string - @var dest: where to store this option + @param dest: where to store this option @type dest: string - @var help: help text + @param help: help text @type help: string """ if not help: diff --git a/gbp/deb.py b/gbp/deb.py index 547fbb7..6da509e 100644 --- a/gbp/deb.py +++ b/gbp/deb.py @@ -480,7 +480,7 @@ def parse_uscan(out): (True, None). Returns (False, None) if the current version is up to date. @param out: uscan output - @param type: string + @type out: string @return: status and tarball name @rtype: tuple >>> parse_uscan("up to date") @@ -545,9 +545,9 @@ def guess_upstream_version(archive, extra_regex=r''): """ guess the package name and version from the filename of an upstgream archive. Returns a tuple with package name and version, or None. - @archive: filename to guess to version for - @extra_regex: additional regex to apply, needs a 'package' and a - 'version' group + @param archive: filename to guess to version for + @param extra_regex: additional regex to apply, needs a 'package' and a + 'version' group >>> guess_upstream_version('foo-bar_0.2.orig.tar.gz') ('foo-bar', '0.2') @@ -566,7 +566,6 @@ def guess_upstream_version(archive, extra_regex=r''): ('kvm', '87+dfsg') >>> guess_upstream_version('foo-Bar_0.2.orig.tar.gz') >>> guess_upstream_version('foo-Bar-a.b.tar.gz') - """ version_chars = r'[a-zA-Z\d\.\~\-\:\+]' extensions = r'\.tar\.(gz|bz2)' diff --git a/gbp/git.py b/gbp/git.py index ec0b906..e184c28 100644 --- a/gbp/git.py +++ b/gbp/git.py @@ -113,7 +113,7 @@ class GitRepository(object): You only need to use this funciton if you also need to check for legacy tags. - @param pattern: tag pattern + @param format: tag pattern @param version: debian version number @return: sha1 of the version tag """ @@ -384,13 +384,17 @@ class GitRepository(object): author={}, committer={}): """Replace the current tip of branch 'branch' with the contents from 'unpack_dir' @param unpack_dir: content to add + @type unpack_dir: striing @param msg: commit message to use + @type msg: string @param branch: branch to add the contents of unpack_dir to - @param parents: additional parents of this commit - @param author: commit with author information from author + @type branch: string + @param other_parents: additional parents of this commit + @type other_parents: list string + @param author: author information to use for commit @type author: dict with keys 'name', 'email', 'date' - @param committer_author: commit with committer information from committer - @type comitter: dict with keys 'name', 'email', 'date'""" + @param committer: committer information to use for commit + @type committer: dict with keys 'name', 'email', 'date'""" self.__check_path() git_index_file = os.path.join(self.path, '.git', 'gbp_index') diff --git a/git-import-orig b/git-import-orig index a64cd07..6c70905 100755 --- a/git-import-orig +++ b/git-import-orig @@ -54,12 +54,12 @@ class OrigUpstreamSource(UpstreamSource): Determine if the upstream sources needs to be repacked We repack if - * we want to filter out files and use pristine tar since we want - to make a filtered tarball available to pristine-tar - * when we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir) - and want to use filters - * when we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir) - and want to use pristine-tar + 1. we want to filter out files and use pristine tar since we want + to make a filtered tarball available to pristine-tar + 2. when we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir) + and want to use filters + 3. when we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir) + and want to use pristine-tar """ if ((options.pristine_tar and options.filter_pristine_tar and len(options.filters) > 0)): return True @@ -155,7 +155,7 @@ def detect_name_and_version(repo, source, options): def ask_package_name(default): """ Ask the user for the source package name. - @default The default package name to suggest to the user. + @param default: The default package name to suggest to the user. """ while True: sourcepackage = raw_input("What will be the source package name? [%s] " % default) @@ -174,7 +174,7 @@ def ask_package_name(default): def ask_package_version(default): """ Ask the user for the upstream package version. - @default The default package version to suggest to the user. + @param default: The default package version to suggest to the user. """ while True: version = raw_input("What is the upstream version? [%s] " % default) @@ -193,7 +193,7 @@ def ask_package_version(default): def find_source(options, args): """Find the tarball to import - either via uscan or via command line argument @return: upstream source filename or None if nothing to import - @rvalue: string + @rtype: string @raise GbpError: raised on all detected errors """ if options.uscan: # uscan mode -- 2.7.4