1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-08 05:58:43 +02:00

Merge pull request #994 from dmach/update-sphinx-configuration

Update Sphinx configuration
This commit is contained in:
2022-06-02 10:09:38 +02:00
committed by GitHub
20 changed files with 188 additions and 407 deletions

View File

@@ -26,7 +26,7 @@ class PackageQueries(dict):
"""Adds package query to dict if it is of the correct architecture and
is newer (has a greater version) than the currently assigned package.
@param a PackageQuery
:param query: a PackageQuery
"""
self.__setitem__(query.name(), query)

View File

@@ -31,9 +31,10 @@ OPERATOR_BY_FLAGS = {
def primaryPath(directory):
"""Returns path to the primary repository data file.
@param directory repository directory that contains the repodata subdirectory
@return str path to primary repository data file
@raise IOError if repomd.xml contains no primary location
:param directory: repository directory that contains the repodata subdirectory
:return: path to primary repository data file
:rtype: str
:raise IOError: if repomd.xml contains no primary location
"""
metaDataPath = os.path.join(directory, "repodata", "repomd.xml")
elementTree = ET.parse(metaDataPath)
@@ -55,10 +56,9 @@ def queries(directory):
"""Returns a list of RepoDataQueries constructed from the repodata under
the directory.
@param directory path to a repository directory (parent directory of
repodata directory)
@return list of RepoDataQueryResult instances
@raise IOError if repomd.xml contains no primary location
:param directory: path to a repository directory (parent directory of repodata directory)
:return: list of RepoDataQueryResult instances
:raise IOError: if repomd.xml contains no primary location
"""
path = primaryPath(directory)
@@ -99,9 +99,8 @@ class RepoDataQueryResult(osc.util.packagequery.PackageQueryResult):
"""Creates a RepoDataQueryResult from the a package Element under a metadata
Element in a primary.xml file.
@param directory repository directory path. Used to convert relative
paths to full paths.
@param element package Element
:param directory: repository directory path. Used to convert relative paths to full paths.
:param element: package Element
"""
self.__directory = os.path.abspath(directory)
self.__element = element