fix part of warnings for sphinx

This commit is contained in:
Evgenii Alekseev 2022-04-17 06:55:31 +03:00
parent e2f7e9cf28
commit 3016a919c5
8 changed files with 70 additions and 64 deletions

View File

@ -35,11 +35,11 @@ class JinjaTemplate:
It uses jinja2 templates for report generation, the following variables are allowed: It uses jinja2 templates for report generation, the following variables are allowed:
homepage - link to homepage, string, optional * homepage - link to homepage, string, optional
link_path - prefix fo packages to download, string, required * link_path - prefix fo packages to download, string, required
has_package_signed - True in case if package sign enabled, False otherwise, required * has_package_signed - True in case if package sign enabled, False otherwise, required
has_repo_signed - True in case if repository database sign enabled, False otherwise, required * has_repo_signed - True in case if repository database sign enabled, False otherwise, required
packages - sorted list of packages properties, required * packages - sorted list of packages properties, required
* architecture, string * architecture, string
* archive_size, pretty printed size, string * archive_size, pretty printed size, string
* build_date, pretty printed datetime, string * build_date, pretty printed datetime, string
@ -52,8 +52,8 @@ class JinjaTemplate:
* name, string * name, string
* url, string * url, string
* version, string * version, string
pgp_key - default PGP key ID, string, optional * pgp_key - default PGP key ID, string, optional
repository - repository name, string, required * repository - repository name, string, required
Attributes: Attributes:
homepage(Optional[str]): homepage link if any (for footer) homepage(Optional[str]): homepage link if any (for footer)

View File

@ -34,14 +34,14 @@ class IndexView(BaseView):
It uses jinja2 templates for report generation, the following variables are allowed: It uses jinja2 templates for report generation, the following variables are allowed:
architecture - repository architecture, string, required * architecture - repository architecture, string, required
auth - authorization descriptor, required * auth - authorization descriptor, required
* authenticated - alias to check if user can see the page, boolean, required * authenticated - alias to check if user can see the page, boolean, required
* control - HTML to insert for login control, HTML string, required * control - HTML to insert for login control, HTML string, required
* enabled - whether authorization is enabled by configuration or not, boolean, required * enabled - whether authorization is enabled by configuration or not, boolean, required
* username - authenticated username if any, string, null means not authenticated * username - authenticated username if any, string, null means not authenticated
index_url - url to the repository index, string, optional * index_url - url to the repository index, string, optional
packages - sorted list of packages properties, required * packages - sorted list of packages properties, required
* base, string * base, string
* depends, sorted list of strings * depends, sorted list of strings
* groups, sorted list of strings * groups, sorted list of strings
@ -52,12 +52,12 @@ class IndexView(BaseView):
* timestamp, pretty printed datetime, string * timestamp, pretty printed datetime, string
* version, string * version, string
* web_url, string * web_url, string
repository - repository name, string, required * repository - repository name, string, required
service - service status properties, required * service - service status properties, required
* status, string based on enum value * status, string based on enum value
* status_color, string based on enum value * status_color, string based on enum value
* timestamp, pretty printed datetime, string * timestamp, pretty printed datetime, string
version - ahriman version, string, required * version - ahriman version, string, required
Attributes: Attributes:
GET_PERMISSION(UserAccess): (class attribute) get permissions of self GET_PERMISSION(UserAccess): (class attribute) get permissions of self

View File

@ -38,9 +38,10 @@ class AddView(BaseView):
add new package add new package
JSON body must be supplied, the following model is used: JSON body must be supplied, the following model is used:
{
"packages": "ahriman" # either list of packages or package name as in AUR >>> {
} >>> "packages": "ahriman" # either list of packages or package name as in AUR
>>> }
Raises: Raises:
HTTPBadRequest: if bad data is supplied HTTPBadRequest: if bad data is supplied

View File

@ -38,9 +38,10 @@ class RemoveView(BaseView):
remove existing packages remove existing packages
JSON body must be supplied, the following model is used: JSON body must be supplied, the following model is used:
{
"packages": "ahriman", # either list of packages or package name >>> {
} >>> "packages": "ahriman", # either list of packages or package name
>>> }
Raises: Raises:
HTTPBadRequest: if bad data is supplied HTTPBadRequest: if bad data is supplied

View File

@ -38,9 +38,10 @@ class RequestView(BaseView):
request to add new package request to add new package
JSON body must be supplied, the following model is used: JSON body must be supplied, the following model is used:
{
"packages": "ahriman" # either list of packages or package name as in AUR >>> {
} >>> "packages": "ahriman" # either list of packages or package name as in AUR
>>> }
Raises: Raises:
HTTPBadRequest: if bad data is supplied HTTPBadRequest: if bad data is supplied

View File

@ -51,9 +51,10 @@ class AhrimanView(BaseView):
update service status update service status
JSON body must be supplied, the following model is used: JSON body must be supplied, the following model is used:
{
"status": "unknown", # service status string, must be valid `BuildStatusEnum` >>> {
} >>> "status": "unknown", # service status string, must be valid `BuildStatusEnum`
>>> }
Raises: Raises:
HTTPBadRequest: if bad data is supplied HTTPBadRequest: if bad data is supplied

View File

@ -82,11 +82,12 @@ class PackageView(BaseView):
update package build status update package build status
JSON body must be supplied, the following model is used: JSON body must be supplied, the following model is used:
{
"status": "unknown", # package build status string, must be valid `BuildStatusEnum` >>> {
"package": {} # package body (use `dataclasses.asdict` to generate one), optional. >>> "status": "unknown", # package build status string, must be valid `BuildStatusEnum`
# Must be supplied in case if package base is unknown >>> "package": {} # package body (use `dataclasses.asdict` to generate one), optional.
} >>> # Must be supplied in case if package base is unknown
>>> }
Raises: Raises:
HTTPBadRequest: if bad data is supplied HTTPBadRequest: if bad data is supplied

View File

@ -72,10 +72,11 @@ class LoginView(BaseView):
login user to service login user to service
either JSON body or form data must be supplied the following fields are required: either JSON body or form data must be supplied the following fields are required:
{
"username": "username" # username to use for login >>> {
"password": "pa55w0rd" # password to use for login >>> "username": "username" # username to use for login
} >>> "password": "pa55w0rd" # password to use for login
>>> }
Raises: Raises:
HTTPFound: on success response HTTPFound: on success response