Skip to content
Snippets Groups Projects
Commit 74dba021 authored by Luca Weiss's avatar Luca Weiss
Browse files

Update docstrings to address Sphinx warnings

parent 5fc176ac
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,7 @@ def run(
def get_remote_url(remote: str = "origin") -> Optional[str]:
""":returns: the remote URL as string, e.g.
"https://gitlab.postmarketos.org/postmarketOS/pmaports.git" """
""":returns: the remote URL as string, e.g. "https://gitlab.postmarketos.org/postmarketOS/pmaports.git" """
ret = run(["remote", "get-url", remote], check=False)
return ret
......
......@@ -375,12 +375,12 @@ def commits_follow_format(commits: list[str]) -> tuple[Optional[bool], list[Any]
"""Check if the commit subjects follow the correct naming format.
:param commits: return value from git.commits_on_top_of()
:returns: (result, subject_err)
result: True if the commits are formatted correctly, False if
something is obviously wrong and None if it is
something between
subject_err: string with commit hash and explanation of what
is wrong with the subject"""
:returns:
- result: True if the commits are formatted correctly, False if
something is obviously wrong and None if it is something between
- subject_err: string with commit hash and explanation of what
is wrong with the subject
"""
subjects = {}
for commit in commits:
ret = git.run(["show", "-s", "--format=%s", commit])
......
......@@ -10,10 +10,12 @@ from typing import Optional
def load() -> dict[str, dict[str, dict[str, int]]]:
""":returns: dict of the loaded lookup table, looks like:
{"gitlab.postmarketos.org":
{"postmarketOS/pmaports":
{"sailfish": 66,
"grate-driver": 67}}}"""
"grate-driver": 67}}}
"""
home_path = os.getenv("HOME")
if not home_path:
return {}
......
......@@ -68,6 +68,7 @@ def verify(runner: Runner) -> None:
"""Verify that a runner ist trusted, or ask the user if they want to trust
it. Exit if the user does not trust it.
:param runner: as returned from the gitlab jobs api:
{"id": 12270837,
"description": "4-blue.shared.runners-manager.gitlab.postmarketos.org/default",
"ip_address": "34.74.35.215",
......
......@@ -132,6 +132,7 @@ def toggle_packages(action, apks: list[str], ret: list[str]) -> list[str]:
def ask(zip_path: str) -> list[str]:
"""Ask the user which packages shall be installed or upgraded.
:param zip_path: downloaded artifacts zip containing the apks
:returns: paths inside the zip file of the packages that the user wants
to install, e.g. ["packages/edge/aarch64/postmarketos-ui-phosh-18-r0.apk"]"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment