Improve documentation

This commit is contained in:
Unrud 2020-01-13 15:51:10 +01:00
parent 3d7757fa38
commit 2e4924a0da
6 changed files with 29 additions and 1 deletions

View File

@ -67,9 +67,11 @@ class Application(
"""WSGI application."""
def __init__(self, configuration):
"""Initialize application.
"""Initialize Application.
``configuration`` see ``radicale.config`` module.
The ``configuration`` must not change during the lifetime of
this object, it is kept as an internal reference.
"""
super().__init__()

View File

@ -53,6 +53,13 @@ def load(configuration):
class BaseAuth:
def __init__(self, configuration):
"""Initialize BaseAuth.
``configuration`` see ``radicale.config`` module.
The ``configuration`` must not change during the lifetime of
this object, it is kept as an internal reference.
"""
self.configuration = configuration
def get_external_login(self, environ):

View File

@ -294,6 +294,8 @@ class Configuration:
``schema`` a dict that describes the configuration format.
See ``DEFAULT_CONFIG_SCHEMA``.
The content of ``schema`` must not change afterwards, it is kept
as an internal reference.
Use ``load()`` to create an instance for use with
``radicale.app.Application``.
@ -316,6 +318,8 @@ class Configuration:
``config`` a dict of the format {SECTION: {OPTION: VALUE, ...}, ...}.
The configuration is checked for errors according to the config schema.
The content of ``config`` must not change afterwards, it is kept
as an internal reference.
``source`` a description of the configuration source (used in error
messages).

View File

@ -59,6 +59,13 @@ def intersect_permissions(a, b="RrWw"):
class BaseRights:
def __init__(self, configuration):
"""Initialize BaseRights.
``configuration`` see ``radicale.config`` module.
The ``configuration`` must not change during the lifetime of
this object, it is kept as an internal reference.
"""
self.configuration = configuration
def authorized(self, user, path, permissions):

View File

@ -46,6 +46,13 @@ def load(configuration):
class BaseWeb:
def __init__(self, configuration):
"""Initialize BaseWeb.
``configuration`` see ``radicale.config`` module.
The ``configuration`` must not change during the lifetime of
this object, it is kept as an internal reference.
"""
self.configuration = configuration
def get(self, environ, base_prefix, path, user):

View File

@ -94,4 +94,5 @@ setup(
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Office/Business :: Groupware"])