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