Docstring cleanups
This commit is contained in:
parent
b21dbd8890
commit
97c3f63f54
@ -84,11 +84,9 @@ class PackageManager:
|
||||
it is to be assumed that no file was created, therefore there
|
||||
is no file to cleanup.
|
||||
|
||||
.. note:: This method is internal and is meant to be called from
|
||||
a subclass in a separate module.
|
||||
|
||||
:returns: path to temporary file
|
||||
:rtype: path-like object
|
||||
:raises NotImplementedError: if package list generation command is not present
|
||||
"""
|
||||
syslog.info("Creating a package list")
|
||||
|
||||
@ -109,14 +107,12 @@ class PackageManager:
|
||||
All arguments and keyword-only arguments are passed directly
|
||||
to the PackageManager object.
|
||||
|
||||
.. note:: This method is internal and is meant to be called from
|
||||
a subclass in a separate module.
|
||||
|
||||
:param compress: compression mode
|
||||
:type compress: str
|
||||
:returns: the path to the created file
|
||||
:rtype: path-like object
|
||||
:raises ValueError: if compress is not in packagemanager.VALID_DB_COMPRESS_MODES
|
||||
:raises NotImplementedError: if database path is not present
|
||||
"""
|
||||
if compress is not None and compress not in VALID_DB_COMPRESS_MODES:
|
||||
raise ValueError(f"{compress} is not a valid compress mode")
|
||||
@ -139,7 +135,7 @@ class PackageManager:
|
||||
@property
|
||||
def cache_directory(self):
|
||||
"""
|
||||
:returns: the cache directory of this package manager.
|
||||
:returns: the cache directory of this package manager
|
||||
:rtype: path-like object
|
||||
"""
|
||||
return self._cachedir
|
||||
@ -147,7 +143,7 @@ class PackageManager:
|
||||
@property
|
||||
def database_path(self):
|
||||
"""
|
||||
:returns: the database path of this package manager.
|
||||
:returns: the database path of this package manager
|
||||
:rtype: path-like object
|
||||
"""
|
||||
return self._db_path
|
||||
@ -163,14 +159,7 @@ class PackageManager:
|
||||
@property
|
||||
def pkglist_cmd(self):
|
||||
"""
|
||||
:returns: the package listing command of this package manager.
|
||||
:returns: the package listing command of this package manager
|
||||
:rtype: iterable or str
|
||||
"""
|
||||
return self._pkglist_cmd
|
||||
|
||||
|
||||
# ========== Functions ==========
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
|
||||
doctest.testmod()
|
||||
|
Loading…
x
Reference in New Issue
Block a user