Bug#784910: python-apt-doc: Wrong indentation and doctring formating cause Sphinx to emit 3 errors and 2 warnings
Package: python-apt-doc
Version: 0.9.4
Severity: normal
Tags: patch
Wrong indentation and docstring formating cause Sphinx to emit the following errors and warnigs during the build of the html documentation.
/home/von/src/python-apt/build/lib.linux-i686-2.7/apt/cache.py:docstring of apt.cache.Cache:14: ERROR: Unexpected indentation.
/home/von/src/python-apt/build/lib.linux-i686-2.7/apt/cache.py:docstring of apt.cache.Cache:16: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/von/src/python-apt/build/lib.linux-i686-2.7/apt/cache.py:docstring of apt.cache.Cache.update:11: ERROR: Unexpected indentation.
/home/von/src/python-apt/build/lib.linux-i686-2.7/apt/package.py:docstring of apt.package.Package.name:8: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/von/src/python-apt/build/lib.linux-i686-2.7/aptsources/sourceslist.py:docstring of aptsources.sourceslist.is_mirror:3: ERROR: Unexpected indentation.
The attached patch solve the problem.
-- no debconf information
>From 1ae66071bb24fbf88b90729c829cd2895baa21ef Mon Sep 17 00:00:00 2001
From: von <matvon@mailoo.org>
Date: Sun, 10 May 2015 16:38:02 +0200
Subject: [PATCH] Fix indentation and docstring problems
---
apt/cache.py | 12 ++++++------
apt/package.py | 1 +
aptsources/sourceslist.py | 8 ++++----
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/apt/cache.py b/apt/cache.py
index 69ee369..f94f214 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -59,11 +59,11 @@ class Cache(object):
objects (although only getting items is supported).
Keyword arguments:
- progress -- a OpProgress object
- rootdir -- a alternative root directory. if that is given
- the system sources.list and system lists/ files are
- not read, only files relative to the given rootdir
- memonly -- build the cache in memory only
+ progress -- a OpProgress object,
+ rootdir -- an alternative root directory. if that is given the system
+ sources.list and system lists/files are not read, only file relative
+ to the given rootdir,
+ memonly -- build the cache in memory only.
"""
def __init__(self, progress=None, rootdir=None, memonly=False):
@@ -409,7 +409,7 @@ class Cache(object):
apt.progress.FetchProgress, the default is apt.progress.FetchProgress()
.
sources_list -- Update a alternative sources.list than the default.
- Note that the sources.list.d directory is ignored in this case
+ Note that the sources.list.d directory is ignored in this case
"""
lockfile = apt_pkg.config.find_dir("Dir::State::Lists") + "lock"
lock = apt_pkg.get_lock(lockfile)
diff --git a/apt/package.py b/apt/package.py
index c67540e..fd859a7 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -785,6 +785,7 @@ class Package(object):
as :attr:`shortname`
.. versionchanged:: 0.7.100.3
+
As part of multi-arch, this field now may include architecture
information.
"""
diff --git a/aptsources/sourceslist.py b/aptsources/sourceslist.py
index 842b145..f490352 100644
--- a/aptsources/sourceslist.py
+++ b/aptsources/sourceslist.py
@@ -44,10 +44,10 @@ __all__ = ['is_mirror', 'SourceEntry', 'NullMatcher', 'SourcesList',
def is_mirror(master_uri, compare_uri):
- """ check if the given add_url is idential or a mirror of orig_uri
- e.g. master_uri = archive.ubuntu.com
- compare_uri = de.archive.ubuntu.com
- -> True
+ """ check if the given add_url is idential or a mirror of orig_uri e.g.:
+ master_uri = archive.ubuntu.com
+ compare_uri = de.archive.ubuntu.com
+ -> True
"""
# remove traling spaces and "/"
compare_uri = compare_uri.rstrip("/ ")
--
2.1.4
Reply to: