瀏覽代碼

Improve documentation

Unrud 6 年之前
父節點
當前提交
2e4924a0da
共有 6 個文件被更改,包括 29 次插入1 次删除
  1. 3 1
      radicale/app/__init__.py
  2. 7 0
      radicale/auth/__init__.py
  3. 4 0
      radicale/config.py
  4. 7 0
      radicale/rights/__init__.py
  5. 7 0
      radicale/web/__init__.py
  6. 1 0
      setup.py

+ 3 - 1
radicale/app/__init__.py

@@ -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__()

+ 7 - 0
radicale/auth/__init__.py

@@ -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):

+ 4 - 0
radicale/config.py

@@ -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).

+ 7 - 0
radicale/rights/__init__.py

@@ -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):

+ 7 - 0
radicale/web/__init__.py

@@ -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):

+ 1 - 0
setup.py

@@ -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"])