Docstring update (#58)

* migrate docstrings from reST to google format

* add raises note

Also change behaviour of the `from_option` method to fallback to
disabled instead of raising exception on unknown option

* fix part of warnings for sphinx

* make identation a bit more readable

* review fixes

* add verbose description for properties to make them parsed by sphinx extenstion

* add demo sphinx generator
This commit is contained in:
2022-04-17 20:25:28 +03:00
committed by GitHub
parent 0db619136d
commit d90f417cae
203 changed files with 5246 additions and 1636 deletions

View File

@ -8,6 +8,8 @@ from unittest.mock import MagicMock
def connection() -> Connection:
"""
mock object for sqlite3 connection
:return: sqlite3 connection test instance
Returns:
Connection: sqlite3 connection test instance
"""
return MagicMock()

View File

@ -9,7 +9,11 @@ from ahriman.core.database.migrations import Migrations
def migrations(connection: Connection) -> Migrations:
"""
fixture for migrations object
:param connection: sqlite connection fixture
:return: migrations test instance
Args:
connection(Connection): sqlite connection fixture
Returns:
Migrations: migrations test instance
"""
return Migrations(connection)