ez-a-sync 0.32.29__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ez-a-sync might be problematic. Click here for more details.
- a_sync/ENVIRONMENT_VARIABLES.py +42 -0
- a_sync/__init__.pxd +2 -0
- a_sync/__init__.py +145 -0
- a_sync/_smart.c +22803 -0
- a_sync/_smart.cp310-win_amd64.pyd +0 -0
- a_sync/_smart.pxd +2 -0
- a_sync/_smart.pyi +202 -0
- a_sync/_smart.pyx +674 -0
- a_sync/_typing.py +258 -0
- a_sync/a_sync/__init__.py +60 -0
- a_sync/a_sync/_descriptor.c +20528 -0
- a_sync/a_sync/_descriptor.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/_descriptor.pyi +33 -0
- a_sync/a_sync/_descriptor.pyx +422 -0
- a_sync/a_sync/_flags.c +6074 -0
- a_sync/a_sync/_flags.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/_flags.pxd +3 -0
- a_sync/a_sync/_flags.pyx +92 -0
- a_sync/a_sync/_helpers.c +14521 -0
- a_sync/a_sync/_helpers.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/_helpers.pxd +3 -0
- a_sync/a_sync/_helpers.pyi +10 -0
- a_sync/a_sync/_helpers.pyx +167 -0
- a_sync/a_sync/_kwargs.c +12194 -0
- a_sync/a_sync/_kwargs.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/_kwargs.pxd +2 -0
- a_sync/a_sync/_kwargs.pyx +64 -0
- a_sync/a_sync/_meta.py +210 -0
- a_sync/a_sync/abstract.c +12411 -0
- a_sync/a_sync/abstract.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/abstract.pyi +141 -0
- a_sync/a_sync/abstract.pyx +221 -0
- a_sync/a_sync/base.c +14932 -0
- a_sync/a_sync/base.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/base.pyi +60 -0
- a_sync/a_sync/base.pyx +271 -0
- a_sync/a_sync/config.py +168 -0
- a_sync/a_sync/decorator.py +651 -0
- a_sync/a_sync/flags.c +5272 -0
- a_sync/a_sync/flags.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/flags.pxd +72 -0
- a_sync/a_sync/flags.pyi +74 -0
- a_sync/a_sync/flags.pyx +72 -0
- a_sync/a_sync/function.c +37846 -0
- a_sync/a_sync/function.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/function.pxd +28 -0
- a_sync/a_sync/function.pyi +571 -0
- a_sync/a_sync/function.pyx +1381 -0
- a_sync/a_sync/method.c +29774 -0
- a_sync/a_sync/method.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/method.pxd +9 -0
- a_sync/a_sync/method.pyi +525 -0
- a_sync/a_sync/method.pyx +1023 -0
- a_sync/a_sync/modifiers/__init__.pxd +1 -0
- a_sync/a_sync/modifiers/__init__.py +101 -0
- a_sync/a_sync/modifiers/cache/__init__.py +160 -0
- a_sync/a_sync/modifiers/cache/memory.py +165 -0
- a_sync/a_sync/modifiers/limiter.py +132 -0
- a_sync/a_sync/modifiers/manager.c +16149 -0
- a_sync/a_sync/modifiers/manager.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/modifiers/manager.pxd +5 -0
- a_sync/a_sync/modifiers/manager.pyi +219 -0
- a_sync/a_sync/modifiers/manager.pyx +299 -0
- a_sync/a_sync/modifiers/semaphores.py +173 -0
- a_sync/a_sync/property.c +27260 -0
- a_sync/a_sync/property.cp310-win_amd64.pyd +0 -0
- a_sync/a_sync/property.pyi +376 -0
- a_sync/a_sync/property.pyx +819 -0
- a_sync/a_sync/singleton.py +63 -0
- a_sync/aliases.py +3 -0
- a_sync/async_property/__init__.pxd +1 -0
- a_sync/async_property/__init__.py +1 -0
- a_sync/async_property/cached.c +20386 -0
- a_sync/async_property/cached.cp310-win_amd64.pyd +0 -0
- a_sync/async_property/cached.pxd +10 -0
- a_sync/async_property/cached.pyi +45 -0
- a_sync/async_property/cached.pyx +178 -0
- a_sync/async_property/proxy.c +34654 -0
- a_sync/async_property/proxy.cp310-win_amd64.pyd +0 -0
- a_sync/async_property/proxy.pxd +2 -0
- a_sync/async_property/proxy.pyi +124 -0
- a_sync/async_property/proxy.pyx +474 -0
- a_sync/asyncio/__init__.pxd +6 -0
- a_sync/asyncio/__init__.py +164 -0
- a_sync/asyncio/as_completed.c +18841 -0
- a_sync/asyncio/as_completed.cp310-win_amd64.pyd +0 -0
- a_sync/asyncio/as_completed.pxd +8 -0
- a_sync/asyncio/as_completed.pyi +109 -0
- a_sync/asyncio/as_completed.pyx +269 -0
- a_sync/asyncio/create_task.c +15902 -0
- a_sync/asyncio/create_task.cp310-win_amd64.pyd +0 -0
- a_sync/asyncio/create_task.pxd +2 -0
- a_sync/asyncio/create_task.pyi +51 -0
- a_sync/asyncio/create_task.pyx +271 -0
- a_sync/asyncio/gather.c +16679 -0
- a_sync/asyncio/gather.cp310-win_amd64.pyd +0 -0
- a_sync/asyncio/gather.pyi +107 -0
- a_sync/asyncio/gather.pyx +218 -0
- a_sync/asyncio/igather.c +12676 -0
- a_sync/asyncio/igather.cp310-win_amd64.pyd +0 -0
- a_sync/asyncio/igather.pxd +1 -0
- a_sync/asyncio/igather.pyi +7 -0
- a_sync/asyncio/igather.pyx +182 -0
- a_sync/asyncio/sleep.c +9593 -0
- a_sync/asyncio/sleep.cp310-win_amd64.pyd +0 -0
- a_sync/asyncio/sleep.pyi +14 -0
- a_sync/asyncio/sleep.pyx +49 -0
- a_sync/debugging.c +15362 -0
- a_sync/debugging.cp310-win_amd64.pyd +0 -0
- a_sync/debugging.pyi +76 -0
- a_sync/debugging.pyx +107 -0
- a_sync/exceptions.c +13312 -0
- a_sync/exceptions.cp310-win_amd64.pyd +0 -0
- a_sync/exceptions.pyi +376 -0
- a_sync/exceptions.pyx +446 -0
- a_sync/executor.py +619 -0
- a_sync/functools.c +12738 -0
- a_sync/functools.cp310-win_amd64.pyd +0 -0
- a_sync/functools.pxd +7 -0
- a_sync/functools.pyi +33 -0
- a_sync/functools.pyx +139 -0
- a_sync/future.py +1497 -0
- a_sync/iter.c +37271 -0
- a_sync/iter.cp310-win_amd64.pyd +0 -0
- a_sync/iter.pxd +11 -0
- a_sync/iter.pyi +370 -0
- a_sync/iter.pyx +981 -0
- a_sync/primitives/__init__.pxd +1 -0
- a_sync/primitives/__init__.py +53 -0
- a_sync/primitives/_debug.c +15757 -0
- a_sync/primitives/_debug.cp310-win_amd64.pyd +0 -0
- a_sync/primitives/_debug.pxd +12 -0
- a_sync/primitives/_debug.pyi +52 -0
- a_sync/primitives/_debug.pyx +223 -0
- a_sync/primitives/_loggable.c +11529 -0
- a_sync/primitives/_loggable.cp310-win_amd64.pyd +0 -0
- a_sync/primitives/_loggable.pxd +4 -0
- a_sync/primitives/_loggable.pyi +66 -0
- a_sync/primitives/_loggable.pyx +102 -0
- a_sync/primitives/locks/__init__.pxd +8 -0
- a_sync/primitives/locks/__init__.py +17 -0
- a_sync/primitives/locks/counter.c +17679 -0
- a_sync/primitives/locks/counter.cp310-win_amd64.pyd +0 -0
- a_sync/primitives/locks/counter.pxd +12 -0
- a_sync/primitives/locks/counter.pyi +151 -0
- a_sync/primitives/locks/counter.pyx +260 -0
- a_sync/primitives/locks/event.c +17063 -0
- a_sync/primitives/locks/event.cp310-win_amd64.pyd +0 -0
- a_sync/primitives/locks/event.pxd +22 -0
- a_sync/primitives/locks/event.pyi +43 -0
- a_sync/primitives/locks/event.pyx +185 -0
- a_sync/primitives/locks/prio_semaphore.c +25590 -0
- a_sync/primitives/locks/prio_semaphore.cp310-win_amd64.pyd +0 -0
- a_sync/primitives/locks/prio_semaphore.pxd +25 -0
- a_sync/primitives/locks/prio_semaphore.pyi +217 -0
- a_sync/primitives/locks/prio_semaphore.pyx +597 -0
- a_sync/primitives/locks/semaphore.c +26509 -0
- a_sync/primitives/locks/semaphore.cp310-win_amd64.pyd +0 -0
- a_sync/primitives/locks/semaphore.pxd +21 -0
- a_sync/primitives/locks/semaphore.pyi +197 -0
- a_sync/primitives/locks/semaphore.pyx +454 -0
- a_sync/primitives/queue.py +1022 -0
- a_sync/py.typed +0 -0
- a_sync/sphinx/__init__.py +3 -0
- a_sync/sphinx/ext.py +289 -0
- a_sync/task.py +932 -0
- a_sync/utils/__init__.py +105 -0
- a_sync/utils/iterators.py +297 -0
- a_sync/utils/repr.c +15799 -0
- a_sync/utils/repr.cp310-win_amd64.pyd +0 -0
- a_sync/utils/repr.pyi +2 -0
- a_sync/utils/repr.pyx +73 -0
- ez_a_sync-0.32.29.dist-info/METADATA +367 -0
- ez_a_sync-0.32.29.dist-info/RECORD +177 -0
- ez_a_sync-0.32.29.dist-info/WHEEL +5 -0
- ez_a_sync-0.32.29.dist-info/licenses/LICENSE.txt +17 -0
- ez_a_sync-0.32.29.dist-info/top_level.txt +1 -0
a_sync/py.typed
ADDED
|
File without changes
|
a_sync/sphinx/ext.py
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"""Sphinx documentation plugin used to document ASyncFunction instances.
|
|
2
|
+
|
|
3
|
+
Introduction
|
|
4
|
+
============
|
|
5
|
+
|
|
6
|
+
Usage
|
|
7
|
+
-----
|
|
8
|
+
|
|
9
|
+
The ez-a-sync extension for Sphinx requires Sphinx 2.0 or later.
|
|
10
|
+
|
|
11
|
+
Add the extension to your :file:`docs/conf.py` configuration module:
|
|
12
|
+
|
|
13
|
+
.. code-block:: python
|
|
14
|
+
|
|
15
|
+
extensions = (...,
|
|
16
|
+
'a_sync.sphinx.ext')
|
|
17
|
+
|
|
18
|
+
If you'd like to change the prefix for tasks in reference documentation
|
|
19
|
+
then you can change the ``a_sync_function_prefix`` configuration value:
|
|
20
|
+
|
|
21
|
+
.. code-block:: python
|
|
22
|
+
|
|
23
|
+
a_sync_function_prefix = '(function)' # < default
|
|
24
|
+
a_sync_descriptor_prefix = '(descriptor)' # < default
|
|
25
|
+
a_sync_generator_function_prefix = '(genfunc)' # < default
|
|
26
|
+
|
|
27
|
+
With the extension installed `autodoc` will automatically find
|
|
28
|
+
ASyncFunction objects (e.g. when using the automodule directive)
|
|
29
|
+
and generate the correct (as well as add a ``(function)`` prefix),
|
|
30
|
+
and you can also refer to the tasks using `:task:proj.tasks.add`
|
|
31
|
+
syntax.
|
|
32
|
+
|
|
33
|
+
Use ``.. autotask::`` to alternatively manually document a task.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
from inspect import signature
|
|
37
|
+
|
|
38
|
+
from docutils import nodes
|
|
39
|
+
from sphinx.domains.python import PyFunction, PyMethod
|
|
40
|
+
from sphinx.ext.autodoc import FunctionDocumenter, MethodDocumenter
|
|
41
|
+
|
|
42
|
+
from a_sync.a_sync._descriptor import ASyncDescriptor
|
|
43
|
+
from a_sync.a_sync.function import (
|
|
44
|
+
ASyncFunction,
|
|
45
|
+
ASyncFunctionAsyncDefault,
|
|
46
|
+
ASyncFunctionSyncDefault,
|
|
47
|
+
)
|
|
48
|
+
from a_sync.iter import ASyncGeneratorFunction
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class _ASyncWrapperDocumenter:
|
|
52
|
+
"""Base class for documenters that handle wrapped ASync functions."""
|
|
53
|
+
|
|
54
|
+
typ: type
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def can_document_member(cls, member, membername, isattr, parent):
|
|
58
|
+
"""Determine if the member can be documented by this documenter.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
member: The member to check.
|
|
62
|
+
membername: The name of the member.
|
|
63
|
+
isattr: Boolean indicating if the member is an attribute.
|
|
64
|
+
parent: The parent object.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
bool: True if the member can be documented, False otherwise.
|
|
68
|
+
"""
|
|
69
|
+
return isinstance(member, cls.typ) and getattr(member, "__wrapped__") is not None
|
|
70
|
+
|
|
71
|
+
def document_members(self, all_members=False):
|
|
72
|
+
"""Document members of the object.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
all_members: Boolean indicating if all members should be documented.
|
|
76
|
+
"""
|
|
77
|
+
pass
|
|
78
|
+
|
|
79
|
+
def check_module(self):
|
|
80
|
+
"""Check if the object is defined in the expected module.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
bool: True if the object is defined in the expected module, False otherwise.
|
|
84
|
+
|
|
85
|
+
Note:
|
|
86
|
+
Normally checks if *self.object* is really defined in the module
|
|
87
|
+
given by *self.modname*. But since functions decorated with the @task
|
|
88
|
+
decorator are instances living in the celery.local, we have to check
|
|
89
|
+
the wrapped function instead.
|
|
90
|
+
"""
|
|
91
|
+
wrapped = getattr(self.object, "__wrapped__", None)
|
|
92
|
+
if wrapped and getattr(wrapped, "__module__") == self.modname:
|
|
93
|
+
return True
|
|
94
|
+
return super().check_module()
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class _ASyncFunctionDocumenter(_ASyncWrapperDocumenter, FunctionDocumenter):
|
|
98
|
+
"""Documenter for ASyncFunction instances."""
|
|
99
|
+
|
|
100
|
+
def format_args(self):
|
|
101
|
+
"""Format the arguments of the wrapped function.
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
str: The formatted arguments.
|
|
105
|
+
"""
|
|
106
|
+
wrapped = getattr(self.object, "__wrapped__", None)
|
|
107
|
+
if wrapped is not None:
|
|
108
|
+
sig = signature(wrapped)
|
|
109
|
+
if "self" in sig.parameters or "cls" in sig.parameters:
|
|
110
|
+
sig = sig.replace(parameters=list(sig.parameters.values())[1:])
|
|
111
|
+
return str(sig)
|
|
112
|
+
return ""
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class _ASyncMethodDocumenter(_ASyncWrapperDocumenter, MethodDocumenter):
|
|
116
|
+
"""Documenter for ASyncMethod instances."""
|
|
117
|
+
|
|
118
|
+
def format_args(self):
|
|
119
|
+
"""Format the arguments of the wrapped method.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
str: The formatted arguments.
|
|
123
|
+
"""
|
|
124
|
+
wrapped = getattr(self.object, "__wrapped__")
|
|
125
|
+
if wrapped is not None:
|
|
126
|
+
return str(signature(wrapped))
|
|
127
|
+
return ""
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class _ASyncDirective:
|
|
131
|
+
"""Base class for ASync directives."""
|
|
132
|
+
|
|
133
|
+
prefix_env: str
|
|
134
|
+
|
|
135
|
+
def get_signature_prefix(self, sig):
|
|
136
|
+
"""Get the signature prefix for the directive.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
sig: The signature to process.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
list: A list of nodes representing the signature prefix.
|
|
143
|
+
"""
|
|
144
|
+
return [nodes.Text(getattr(self.env.config, self.prefix_env))]
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class _ASyncFunctionDirective(_ASyncDirective, PyFunction):
|
|
148
|
+
"""Directive for ASyncFunction instances."""
|
|
149
|
+
|
|
150
|
+
pass
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class _ASyncMethodDirective(_ASyncDirective, PyMethod):
|
|
154
|
+
"""Directive for ASyncMethod instances."""
|
|
155
|
+
|
|
156
|
+
pass
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class ASyncFunctionDocumenter(_ASyncFunctionDocumenter):
|
|
160
|
+
"""Document ASyncFunction instance definitions."""
|
|
161
|
+
|
|
162
|
+
objtype = "a_sync_function"
|
|
163
|
+
typ = ASyncFunction
|
|
164
|
+
priority = 15
|
|
165
|
+
# member_order = 11
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class ASyncFunctionSyncDocumenter(_ASyncFunctionDocumenter):
|
|
169
|
+
"""Document ASyncFunctionSyncDefault instance definitions."""
|
|
170
|
+
|
|
171
|
+
objtype = "a_sync_function_sync"
|
|
172
|
+
typ = ASyncFunctionSyncDefault
|
|
173
|
+
priority = 14
|
|
174
|
+
# member_order = 11
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class ASyncFunctionAsyncDocumenter(_ASyncFunctionDocumenter):
|
|
178
|
+
"""Document ASyncFunctionAsyncDefault instance definitions."""
|
|
179
|
+
|
|
180
|
+
objtype = "a_sync_function_async"
|
|
181
|
+
typ = ASyncFunctionAsyncDefault
|
|
182
|
+
priority = 13
|
|
183
|
+
# member_order = 11
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class ASyncFunctionDirective(_ASyncFunctionDirective):
|
|
187
|
+
"""Directive for ASyncFunction instances."""
|
|
188
|
+
|
|
189
|
+
prefix_env = "a_sync_function_prefix"
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class ASyncFunctionSyncDirective(_ASyncFunctionDirective):
|
|
193
|
+
"""Directive for ASyncFunctionSyncDefault instances."""
|
|
194
|
+
|
|
195
|
+
prefix_env = "a_sync_function_sync_prefix"
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class ASyncFunctionAsyncDirective(_ASyncFunctionDirective):
|
|
199
|
+
"""Directive for ASyncFunctionAsyncDefault instances."""
|
|
200
|
+
|
|
201
|
+
prefix_env = "a_sync_function_async_prefix"
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
class ASyncDescriptorDocumenter(_ASyncMethodDocumenter):
|
|
205
|
+
"""Document ASyncDescriptor instance definitions."""
|
|
206
|
+
|
|
207
|
+
objtype = "a_sync_descriptor"
|
|
208
|
+
typ = ASyncDescriptor
|
|
209
|
+
# member_order = 11
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class ASyncDescriptorDirective(_ASyncMethodDirective):
|
|
213
|
+
"""Directive for ASyncDescriptor instances."""
|
|
214
|
+
|
|
215
|
+
prefix_env = "a_sync_descriptor_prefix"
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class ASyncGeneratorFunctionDocumenter(_ASyncFunctionDocumenter):
|
|
219
|
+
"""Document ASyncGeneratorFunction instance definitions."""
|
|
220
|
+
|
|
221
|
+
objtype = "a_sync_generator_function"
|
|
222
|
+
typ = ASyncGeneratorFunction
|
|
223
|
+
# member_order = 11
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class ASyncGeneratorFunctionDirective(_ASyncFunctionDirective):
|
|
227
|
+
"""Directive for ASyncGeneratorFunction instances."""
|
|
228
|
+
|
|
229
|
+
prefix_env = "a_sync_generator_function_prefix"
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def autodoc_skip_member_handler(app, what, name, obj, skip, options):
|
|
233
|
+
"""Handler for autodoc-skip-member event.
|
|
234
|
+
|
|
235
|
+
Args:
|
|
236
|
+
app: The Sphinx application object.
|
|
237
|
+
what: The type of the object being documented.
|
|
238
|
+
name: The name of the object.
|
|
239
|
+
obj: The object itself.
|
|
240
|
+
skip: Boolean indicating if the member should be skipped.
|
|
241
|
+
options: The options for the autodoc directive.
|
|
242
|
+
|
|
243
|
+
Returns:
|
|
244
|
+
bool: True if the member should be skipped, False otherwise.
|
|
245
|
+
"""
|
|
246
|
+
if isinstance(obj, (ASyncFunction, ASyncDescriptor, ASyncGeneratorFunction)) and getattr(
|
|
247
|
+
obj, "__wrapped__"
|
|
248
|
+
):
|
|
249
|
+
if skip:
|
|
250
|
+
return False
|
|
251
|
+
return None
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def setup(app):
|
|
255
|
+
"""Setup Sphinx extension.
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
app: The Sphinx application object.
|
|
259
|
+
|
|
260
|
+
Returns:
|
|
261
|
+
dict: A dictionary with metadata about the extension.
|
|
262
|
+
"""
|
|
263
|
+
app.setup_extension("sphinx.ext.autodoc")
|
|
264
|
+
|
|
265
|
+
# function
|
|
266
|
+
app.add_autodocumenter(ASyncFunctionDocumenter)
|
|
267
|
+
app.add_autodocumenter(ASyncFunctionSyncDocumenter)
|
|
268
|
+
app.add_autodocumenter(ASyncFunctionAsyncDocumenter)
|
|
269
|
+
app.add_directive_to_domain("py", "a_sync_function", ASyncFunctionDirective)
|
|
270
|
+
app.add_directive_to_domain("py", "a_sync_function_sync", ASyncFunctionSyncDirective)
|
|
271
|
+
app.add_directive_to_domain("py", "a_sync_function_async", ASyncFunctionAsyncDirective)
|
|
272
|
+
app.add_config_value("a_sync_function_sync_prefix", "ASyncFunction (sync)", True)
|
|
273
|
+
app.add_config_value("a_sync_function_async_prefix", "ASyncFunction (async)", True)
|
|
274
|
+
app.add_config_value("a_sync_function_prefix", "ASyncFunction", True)
|
|
275
|
+
|
|
276
|
+
# descriptor
|
|
277
|
+
app.add_autodocumenter(ASyncDescriptorDocumenter)
|
|
278
|
+
app.add_directive_to_domain("py", "a_sync_descriptor", ASyncDescriptorDirective)
|
|
279
|
+
app.add_config_value("a_sync_descriptor_prefix", "ASyncDescriptor", True)
|
|
280
|
+
|
|
281
|
+
# generator
|
|
282
|
+
|
|
283
|
+
app.add_autodocumenter(ASyncGeneratorFunctionDocumenter)
|
|
284
|
+
app.add_directive_to_domain("py", "a_sync_generator_function", ASyncGeneratorFunctionDirective)
|
|
285
|
+
app.add_config_value("a_sync_generator_function_prefix", "ASyncGeneratorFunction", True)
|
|
286
|
+
|
|
287
|
+
app.connect("autodoc-skip-member", autodoc_skip_member_handler)
|
|
288
|
+
|
|
289
|
+
return {"parallel_read_safe": True}
|