From 3ad2c494af3c5d6c57d64847adf932985fd8e080 Mon Sep 17 00:00:00 2001 From: Evgenii Alekseev Date: Sun, 22 Mar 2026 17:06:26 +0200 Subject: [PATCH] docs: update docstrings --- src/ahriman/core/alpm/pkgbuild_parser.py | 2 +- src/ahriman/core/alpm/remote/aur.py | 2 +- src/ahriman/core/alpm/remote/official.py | 2 +- src/ahriman/core/alpm/remote/official_syncdb.py | 2 +- src/ahriman/core/auth/auth.py | 6 +++--- src/ahriman/core/auth/helpers.py | 8 +++++++- src/ahriman/core/auth/oauth.py | 4 ++-- src/ahriman/core/configuration/configuration.py | 2 +- src/ahriman/core/http/sync_http_client.py | 2 +- src/ahriman/core/report/console.py | 2 +- src/ahriman/core/report/html.py | 4 ++-- src/ahriman/core/report/report.py | 2 +- src/ahriman/core/triggers/trigger.py | 2 +- src/ahriman/core/utils.py | 10 +++++----- src/ahriman/models/aur_package.py | 4 ++-- src/ahriman/models/build_status.py | 2 +- src/ahriman/models/changes.py | 6 +++--- src/ahriman/models/counters.py | 4 ++-- src/ahriman/models/event.py | 6 +++--- src/ahriman/models/internal_status.py | 6 +++--- src/ahriman/models/log_record.py | 6 +++--- src/ahriman/models/package.py | 10 +++++----- src/ahriman/models/package_description.py | 8 ++++---- src/ahriman/models/pkgbuild_patch.py | 8 ++++---- src/ahriman/models/remote_source.py | 6 +++--- src/ahriman/models/report_settings.py | 4 ++-- src/ahriman/models/repository_id.py | 2 +- src/ahriman/models/repository_stats.py | 4 ++-- src/ahriman/models/worker.py | 2 +- src/ahriman/web/middlewares/exception_handler.py | 4 ++-- src/ahriman/web/server_info.py | 2 +- src/ahriman/web/views/api/docs.py | 2 +- src/ahriman/web/views/api/swagger.py | 2 +- src/ahriman/web/views/base.py | 2 +- 34 files changed, 73 insertions(+), 67 deletions(-) diff --git a/src/ahriman/core/alpm/pkgbuild_parser.py b/src/ahriman/core/alpm/pkgbuild_parser.py index ded0ae69..9897c1ab 100644 --- a/src/ahriman/core/alpm/pkgbuild_parser.py +++ b/src/ahriman/core/alpm/pkgbuild_parser.py @@ -104,7 +104,7 @@ class PkgbuildParser(shlex.shlex): # ignore substitution and extend bash symbols self.wordchars += "${}#:+-@!" - # in case of default behaviour, it will ignore, for example, segment part of url outside of quotes + # in case of default behavior, it will ignore, for example, segment part of url outside of quotes self.commenters = "" @staticmethod diff --git a/src/ahriman/core/alpm/remote/aur.py b/src/ahriman/core/alpm/remote/aur.py index babcfa9e..ab55cb53 100644 --- a/src/ahriman/core/alpm/remote/aur.py +++ b/src/ahriman/core/alpm/remote/aur.py @@ -72,7 +72,7 @@ class AUR(Remote): parse RPC response to package list Args: - response(dict[str, Any]): RPC response json + response(dict[str, Any]): RPC response JSON Returns: list[AURPackage]: list of parsed packages diff --git a/src/ahriman/core/alpm/remote/official.py b/src/ahriman/core/alpm/remote/official.py index 73e2d05f..89770e4b 100644 --- a/src/ahriman/core/alpm/remote/official.py +++ b/src/ahriman/core/alpm/remote/official.py @@ -74,7 +74,7 @@ class Official(Remote): parse RPC response to package list Args: - response(dict[str, Any]): RPC response json + response(dict[str, Any]): RPC response JSON Returns: list[AURPackage]: list of parsed packages diff --git a/src/ahriman/core/alpm/remote/official_syncdb.py b/src/ahriman/core/alpm/remote/official_syncdb.py index 107cf65e..c46a9ad7 100644 --- a/src/ahriman/core/alpm/remote/official_syncdb.py +++ b/src/ahriman/core/alpm/remote/official_syncdb.py @@ -32,7 +32,7 @@ class OfficialSyncdb(Official): updates. This approach also has limitations, because we don't require superuser rights (neither going to download database - separately), the database file might be outdated and must be handled manually (or kind of). This behaviour might be + separately), the database file might be outdated and must be handled manually (or kind of). This behavior might be changed in the future. Still we leave search function based on the official repositories RPC. diff --git a/src/ahriman/core/auth/auth.py b/src/ahriman/core/auth/auth.py index 4aaed2f9..0fcab71e 100644 --- a/src/ahriman/core/auth/auth.py +++ b/src/ahriman/core/auth/auth.py @@ -50,13 +50,13 @@ class Auth(LazyLogging): @property def auth_control(self) -> str: """ - This workaround is required to make different behaviour for login interface. + This workaround is required to make different behavior for login interface. In case of internal authentication it must provide an interface (modal form) to log in with button sends POST - request. But for an external providers behaviour can be different: e.g. OAuth provider requires sending GET + request. But for an external providers behavior can be different: e.g. OAuth provider requires sending GET request to external resource Returns: - str: login control as html code to insert + str: login control as HTML code to insert """ return "" diff --git a/src/ahriman/core/auth/helpers.py b/src/ahriman/core/auth/helpers.py index d528fa01..617f4404 100644 --- a/src/ahriman/core/auth/helpers.py +++ b/src/ahriman/core/auth/helpers.py @@ -30,7 +30,13 @@ except ImportError: from typing import Any -__all__ = ["authorized_userid", "check_authorized", "forget", "remember"] +__all__ = [ + "authorized_userid", + "check_authorized", + "forget", + "get_session", + "remember", +] async def authorized_userid(*args: Any, **kwargs: Any) -> Any: diff --git a/src/ahriman/core/auth/oauth.py b/src/ahriman/core/auth/oauth.py index e14355de..6d74411a 100644 --- a/src/ahriman/core/auth/oauth.py +++ b/src/ahriman/core/auth/oauth.py @@ -62,10 +62,10 @@ class OAuth(Mapping): @property def auth_control(self) -> str: """ - get authorization html control + get authorization HTML control Returns: - str: login control as html code to insert + str: login control as HTML code to insert """ return " login" diff --git a/src/ahriman/core/configuration/configuration.py b/src/ahriman/core/configuration/configuration.py index 0a9276b2..7682a749 100644 --- a/src/ahriman/core/configuration/configuration.py +++ b/src/ahriman/core/configuration/configuration.py @@ -72,7 +72,7 @@ class Configuration(configparser.RawConfigParser): def __init__(self, allow_no_value: bool = False, allow_multi_key: bool = True) -> None: """ Args: - allow_no_value(bool, optional): copies :class:`configparser.RawConfigParser` behaviour. In case if it is set + allow_no_value(bool, optional): copies :class:`configparser.RawConfigParser` behavior. In case if it is set to ``True``, the keys without values will be allowed (Default value = False) allow_multi_key(bool, optional): if set to ``False``, then the default dictionary class will be used to store keys internally. Otherwise, the special implementation will be used, which supports arrays diff --git a/src/ahriman/core/http/sync_http_client.py b/src/ahriman/core/http/sync_http_client.py index c07b55b3..6c6f5057 100644 --- a/src/ahriman/core/http/sync_http_client.py +++ b/src/ahriman/core/http/sync_http_client.py @@ -171,7 +171,7 @@ class SyncHttpClient(LazyLogging): headers(dict[str, str] | None, optional): request headers (Default value = None) params(list[tuple[str, str]] | None, optional): request query parameters (Default value = None) data(Any | None, optional): request raw data parameters (Default value = None) - json(dict[str, Any] | None, optional): request json parameters (Default value = None) + json(dict[str, Any] | None, optional): request JSON parameters (Default value = None) files(dict[str, MultipartType] | None, optional): multipart upload (Default value = None) stream(bool | None, optional): handle response as stream (Default value = None) session(requests.Session | None, optional): session object if any (Default value = None) diff --git a/src/ahriman/core/report/console.py b/src/ahriman/core/report/console.py index 62fe675e..ea8487ce 100644 --- a/src/ahriman/core/report/console.py +++ b/src/ahriman/core/report/console.py @@ -27,7 +27,7 @@ from ahriman.models.result import Result class Console(Report): """ - html report generator + HTML report generator Attributes: use_utf(bool): print utf8 symbols instead of ASCII diff --git a/src/ahriman/core/report/html.py b/src/ahriman/core/report/html.py index 1463aa68..37ae11a5 100644 --- a/src/ahriman/core/report/html.py +++ b/src/ahriman/core/report/html.py @@ -27,10 +27,10 @@ from ahriman.models.result import Result class HTML(Report, JinjaTemplate): """ - html report generator + HTML report generator Attributes: - report_path(Path): output path to html report + report_path(Path): output path to HTML report template(Path | str): name or path to template for full package list """ diff --git a/src/ahriman/core/report/report.py b/src/ahriman/core/report/report.py index 62c91a82..a09f46b9 100644 --- a/src/ahriman/core/report/report.py +++ b/src/ahriman/core/report/report.py @@ -71,7 +71,7 @@ class Report(LazyLogging): Args: repository_id(RepositoryId): repository unique identifier configuration(Configuration): configuration instance - target(str): target to generate report aka section name (e.g. html) + target(str): target to generate report aka section name (e.g. HTML) Returns: Report: client according to current settings diff --git a/src/ahriman/core/triggers/trigger.py b/src/ahriman/core/triggers/trigger.py index 8c738480..eab7cdf1 100644 --- a/src/ahriman/core/triggers/trigger.py +++ b/src/ahriman/core/triggers/trigger.py @@ -34,7 +34,7 @@ class Trigger(LazyLogging): Attributes: CONFIGURATION_SCHEMA(ConfigurationSchema): (class attribute) configuration schema template - REQUIRES_REPOSITORY(bool): (class attribute) either trigger requires loaded repository or not + REQUIRES_REPOSITORY(bool): (class attribute) either trigger requires a repository to be loaded or not configuration(Configuration): configuration instance repository_id(RepositoryId): repository unique identifier diff --git a/src/ahriman/core/utils.py b/src/ahriman/core/utils.py index 79b71424..48db2cf7 100644 --- a/src/ahriman/core/utils.py +++ b/src/ahriman/core/utils.py @@ -231,13 +231,13 @@ def check_user(root: Path, *, unsafe: bool) -> None: def dataclass_view(instance: Any) -> dict[str, Any]: """ - convert dataclass instance to json object + convert dataclass instance to JSON object Args: instance(Any): dataclass instance Returns: - dict[str, Any]: json representation of the dataclass with empty field removed + dict[str, Any]: JSON representation of the dataclass with empty field removed """ return asdict(instance, dict_factory=lambda fields: {key: value for key, value in fields if value is not None}) @@ -287,15 +287,15 @@ def filelock(path: Path) -> Iterator[FileLock]: def filter_json(source: T, known_fields: Iterable[str] | None = None) -> T: """ - recursively filter json object removing ``None`` values and optionally filtering by known fields + recursively filter JSON object removing ``None`` values and optionally filtering by known fields Args: - source(T): raw json object (dict, list, or scalar) + source(T): raw JSON object (dict, list, or scalar) known_fields(Iterable[str] | None, optional): list of fields which have to be known for the target object (Default value = None) Returns: - T: json without ``None`` values + T: JSON without ``None`` values Examples: This wrapper is mainly used for the dataclasses, thus the flow must be something like this:: diff --git a/src/ahriman/models/aur_package.py b/src/ahriman/models/aur_package.py index a3f2c0fd..cfe60386 100644 --- a/src/ahriman/models/aur_package.py +++ b/src/ahriman/models/aur_package.py @@ -62,7 +62,7 @@ class AURPackage: Examples: Mainly this class must be used from class methods instead of default :func:`__init__()`:: - >>> package = AURPackage.from_json(metadata) # load package from json dump + >>> package = AURPackage.from_json(metadata) # load package from JSON dump >>> # ...or alternatively... >>> package = AURPackage.from_repo(metadata) # load package from official repository RPC >>> # properties of the class are built based on ones from AUR RPC, thus additional method is required @@ -175,7 +175,7 @@ class AURPackage: construct package descriptor from official repository RPC properties Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: AUR package descriptor diff --git a/src/ahriman/models/build_status.py b/src/ahriman/models/build_status.py index 44798866..e000dfae 100644 --- a/src/ahriman/models/build_status.py +++ b/src/ahriman/models/build_status.py @@ -89,7 +89,7 @@ class BuildStatus: def view(self) -> dict[str, Any]: """ - generate json status view + generate JSON status view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/changes.py b/src/ahriman/models/changes.py index 7b08f2e3..25737619 100644 --- a/src/ahriman/models/changes.py +++ b/src/ahriman/models/changes.py @@ -41,10 +41,10 @@ class Changes: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct changes from the json dump + construct changes from the JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: changes object @@ -55,7 +55,7 @@ class Changes: def view(self) -> dict[str, Any]: """ - generate json change view + generate JSON change view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/counters.py b/src/ahriman/models/counters.py index 9d6a2f82..7d72eb37 100644 --- a/src/ahriman/models/counters.py +++ b/src/ahriman/models/counters.py @@ -49,10 +49,10 @@ class Counters: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct counters from json dump + construct counters from JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: status counters diff --git a/src/ahriman/models/event.py b/src/ahriman/models/event.py index 023a9235..f6ceb46c 100644 --- a/src/ahriman/models/event.py +++ b/src/ahriman/models/event.py @@ -72,10 +72,10 @@ class Event: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct event from the json dump + construct event from the JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: event object @@ -102,7 +102,7 @@ class Event: def view(self) -> dict[str, Any]: """ - generate json event view + generate JSON event view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/internal_status.py b/src/ahriman/models/internal_status.py index 8d2fcef8..110530e8 100644 --- a/src/ahriman/models/internal_status.py +++ b/src/ahriman/models/internal_status.py @@ -50,10 +50,10 @@ class InternalStatus: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct internal status from json dump + construct internal status from JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: internal status @@ -70,7 +70,7 @@ class InternalStatus: def view(self) -> dict[str, Any]: """ - generate json status view + generate JSON status view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/log_record.py b/src/ahriman/models/log_record.py index cdc89010..f89894be 100644 --- a/src/ahriman/models/log_record.py +++ b/src/ahriman/models/log_record.py @@ -41,11 +41,11 @@ class LogRecord: @classmethod def from_json(cls, package_base: str, dump: dict[str, Any]) -> Self: """ - construct log record from the json dump + construct log record from the JSON dump Args: package_base(str): package base for which log record belongs - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: log record object @@ -63,7 +63,7 @@ class LogRecord: def view(self) -> dict[str, Any]: """ - generate json log record view + generate JSON log record view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/package.py b/src/ahriman/models/package.py index 7d2d86c0..be0286be 100644 --- a/src/ahriman/models/package.py +++ b/src/ahriman/models/package.py @@ -50,11 +50,11 @@ class Package(LazyLogging): version(str): package full version Examples: - Different usages of this class may generate different (incomplete) data, e.g. if instantiating class from json:: + Different usages of this class may generate different (incomplete) data, e.g. if instantiating class from JSON:: >>> package = Package.from_json(dump) - it will contain every data available in the json body. Otherwise, if generate package from local archive:: + it will contain every data available in the JSON body. Otherwise, if generate package from local archive:: >>> package = Package.from_archive(local_path, pacman) @@ -273,10 +273,10 @@ class Package(LazyLogging): @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct package properties from json dump + construct package properties from JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: package properties @@ -396,7 +396,7 @@ class Package(LazyLogging): def view(self) -> dict[str, Any]: """ - generate json package view + generate JSON package view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/package_description.py b/src/ahriman/models/package_description.py index 676ef619..ef517802 100644 --- a/src/ahriman/models/package_description.py +++ b/src/ahriman/models/package_description.py @@ -49,7 +49,7 @@ class PackageDescription: Examples: Unlike the :class:`ahriman.models.package.Package` class, this implementation only holds properties. - The recommended way to deal with it is to read data based on the source type - either json or + The recommended way to deal with it is to read data based on the source type - either JSON or :class:`pyalpm.Package` instance:: >>> description = PackageDescription.from_json(dump) @@ -126,10 +126,10 @@ class PackageDescription: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct package properties from json dump + construct package properties from JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: package properties @@ -169,7 +169,7 @@ class PackageDescription: def view(self) -> dict[str, Any]: """ - generate json package view + generate JSON package view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/pkgbuild_patch.py b/src/ahriman/models/pkgbuild_patch.py index 3f87d1bb..ece281ab 100644 --- a/src/ahriman/models/pkgbuild_patch.py +++ b/src/ahriman/models/pkgbuild_patch.py @@ -87,10 +87,10 @@ class PkgbuildPatch: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct patch descriptor from the json dump + construct patch descriptor from the JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: patch object @@ -125,7 +125,7 @@ class PkgbuildPatch: # the source value looks like shell array, remove brackets and parse with shlex return shlex.split(shell_array[1:-1]) case json_array if json_array.startswith("[") and json_array.endswith("]"): - # json (aka python) array, parse with json parser instead + # JSON (aka python) array, parse with JSON parser instead parsed: list[str] = json.loads(json_array) return parsed case variable: @@ -220,7 +220,7 @@ class PkgbuildPatch: def view(self) -> dict[str, Any]: """ - generate json patch view + generate JSON patch view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/remote_source.py b/src/ahriman/models/remote_source.py index 0629d220..843a513d 100644 --- a/src/ahriman/models/remote_source.py +++ b/src/ahriman/models/remote_source.py @@ -74,10 +74,10 @@ class RemoteSource: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct remote source from the json dump (or database row) + construct remote source from the JSON dump (or database row) Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: remote source @@ -102,7 +102,7 @@ class RemoteSource: def view(self) -> dict[str, Any]: """ - generate json package remote view + generate JSON package remote view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/report_settings.py b/src/ahriman/models/report_settings.py index 3957f7c3..32811598 100644 --- a/src/ahriman/models/report_settings.py +++ b/src/ahriman/models/report_settings.py @@ -28,10 +28,10 @@ class ReportSettings(StrEnum): Attributes: Disabled(ReportSettings): option which generates no report for testing purpose - HTML(ReportSettings): html report generation + HTML(ReportSettings): HTML report generation Email(ReportSettings): email report generation Console(ReportSettings): print result to console - Telegram(ReportSettings): markdown report to telegram channel + Telegram(ReportSettings): Markdown report to telegram channel RSS(ReportSettings): RSS report generation RemoteCall(ReportSettings): remote ahriman server call """ diff --git a/src/ahriman/models/repository_id.py b/src/ahriman/models/repository_id.py index bd06d5eb..7aafeaf9 100644 --- a/src/ahriman/models/repository_id.py +++ b/src/ahriman/models/repository_id.py @@ -70,7 +70,7 @@ class RepositoryId: def view(self) -> dict[str, Any]: """ - generate json package view + generate JSON package view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/models/repository_stats.py b/src/ahriman/models/repository_stats.py index 0f545b77..46065a57 100644 --- a/src/ahriman/models/repository_stats.py +++ b/src/ahriman/models/repository_stats.py @@ -38,10 +38,10 @@ class RepositoryStats: @classmethod def from_json(cls, dump: dict[str, Any]) -> Self: """ - construct counters from json dump + construct counters from JSON dump Args: - dump(dict[str, Any]): json dump body + dump(dict[str, Any]): JSON dump body Returns: Self: status counters diff --git a/src/ahriman/models/worker.py b/src/ahriman/models/worker.py index 890b1233..e8b46609 100644 --- a/src/ahriman/models/worker.py +++ b/src/ahriman/models/worker.py @@ -45,7 +45,7 @@ class Worker: def view(self) -> dict[str, Any]: """ - generate json patch view + generate JSON worker view Returns: dict[str, Any]: json-friendly dictionary diff --git a/src/ahriman/web/middlewares/exception_handler.py b/src/ahriman/web/middlewares/exception_handler.py index c95007df..daff22d1 100644 --- a/src/ahriman/web/middlewares/exception_handler.py +++ b/src/ahriman/web/middlewares/exception_handler.py @@ -42,13 +42,13 @@ __all__ = ["exception_handler"] def _is_templated_unauthorized(request: Request) -> bool: """ - check if the request is eligible for rendering html template + check if the request is eligible for rendering HTML template Args: request(Request): source request to check Returns: - bool: ``True`` in case if response should be rendered as html and ``False`` otherwise + bool: ``True`` in case if response should be rendered as HTML and ``False`` otherwise """ return request.path in ("/api/v1/login", "/api/v1/logout") \ and "application/json" not in request.headers.getall("accept", []) diff --git a/src/ahriman/web/server_info.py b/src/ahriman/web/server_info.py index 6ee2075b..63677d03 100644 --- a/src/ahriman/web/server_info.py +++ b/src/ahriman/web/server_info.py @@ -39,7 +39,7 @@ async def server_info(view: BaseView) -> dict[str, Any]: view(BaseView): view of the request Returns: - dict[str, Any]: server info as a json response + dict[str, Any]: server info as a JSON response """ autorefresh_intervals = [ { diff --git a/src/ahriman/web/views/api/docs.py b/src/ahriman/web/views/api/docs.py index 87387aa6..fa873349 100644 --- a/src/ahriman/web/views/api/docs.py +++ b/src/ahriman/web/views/api/docs.py @@ -57,7 +57,7 @@ class DocsView(BaseView): @aiohttp_jinja2.template("api.jinja2") async def get(self) -> dict[str, Any]: """ - return static docs html + return static docs HTML Returns: dict[str, Any]: parameters for jinja template diff --git a/src/ahriman/web/views/api/swagger.py b/src/ahriman/web/views/api/swagger.py index f60566ca..c1b91a5c 100644 --- a/src/ahriman/web/views/api/swagger.py +++ b/src/ahriman/web/views/api/swagger.py @@ -60,7 +60,7 @@ class SwaggerView(BaseView): get api specification Returns: - Response: 200 with json api specification + Response: 200 with JSON api specification """ spec = self.request.app["swagger_dict"] is_body_parameter: Callable[[dict[str, str]], bool] = lambda p: p["in"] == "body" or p["in"] == "formData" diff --git a/src/ahriman/web/views/base.py b/src/ahriman/web/views/base.py index a38f22c9..cb172d0a 100644 --- a/src/ahriman/web/views/base.py +++ b/src/ahriman/web/views/base.py @@ -169,7 +169,7 @@ class BaseView(View, CorsViewMixin): filter and convert data and return :class:`aiohttp.web.Response` object Args: - data(dict[str, Any] | list[Any]): response in json format + data(dict[str, Any] | list[Any]): response in JSON format **kwargs(Any): keyword arguments for :func:`aiohttp.web.json_response` function Returns: