@@ -116,7 +116,7 @@ def setup(app):
116116
117117
118118language = "en"
119- exclude_patterns = ["_build" ]
119+ exclude_patterns = ["_build" , "prolog.rst" ]
120120pygments_style = "sphinx"
121121todo_include_todos = False
122122
@@ -166,172 +166,7 @@ def setup(app):
166166
167167autodoc_mock_imports = ["numpy" , "pandas" , "redis" , "django" , "pytz" ]
168168
169- rst_prolog = """
170- .. |given| replace:: :func:`~hypothesis.given`
171- .. |@given| replace:: :func:`@given <hypothesis.given>`
172- .. |@example| replace:: :func:`@example <hypothesis.example>`
173- .. |@example.xfail| replace:: :func:`@example(...).xfail() <hypothesis.example.xfail>`
174- .. |@settings| replace:: :func:`@settings <hypothesis.settings>`
175- .. |settings| replace:: :func:`settings <hypothesis.settings>`
176- .. |@composite| replace:: :func:`@composite <hypothesis.strategies.composite>`
177- .. |assume| replace:: :func:`~hypothesis.assume`
178- .. |target| replace:: :func:`~hypothesis.target`
179- .. |event| replace:: :func:`~hypothesis.event`
180- .. |note| replace:: :func:`~hypothesis.note`
181-
182- .. |max_examples| replace:: :obj:`~hypothesis.settings.max_examples`
183- .. |settings.max_examples| replace:: :obj:`settings.max_examples <hypothesis.settings.max_examples>`
184- .. |settings.database| replace:: :obj:`settings.database <hypothesis.settings.database>`
185- .. |settings.deadline| replace:: :obj:`settings.deadline <hypothesis.settings.deadline>`
186- .. |settings.derandomize| replace:: :obj:`settings.derandomize <hypothesis.settings.derandomize>`
187- .. |settings.phases| replace:: :obj:`settings.phases <hypothesis.settings.phases>`
188- .. |settings.print_blob| replace:: :obj:`settings.print_blob <hypothesis.settings.print_blob>`
189- .. |settings.report_multiple_bugs| replace:: :obj:`settings.report_multiple_bugs <hypothesis.settings.report_multiple_bugs>`
190- .. |settings.verbosity| replace:: :obj:`settings.verbosity <hypothesis.settings.verbosity>`
191- .. |settings.suppress_health_check| replace:: \
192- :obj:`settings.suppress_health_check <hypothesis.settings.suppress_health_check>`
193- .. |settings.stateful_step_count| replace:: :obj:`settings.stateful_step_count <hypothesis.settings.stateful_step_count>`
194- .. |settings.backend| replace:: :obj:`settings.backend <hypothesis.settings.backend>`
195-
196- .. |~settings.max_examples| replace:: :obj:`~hypothesis.settings.max_examples`
197- .. |~settings.database| replace:: :obj:`~hypothesis.settings.database`
198- .. |~settings.deadline| replace:: :obj:`~hypothesis.settings.deadline`
199- .. |~settings.derandomize| replace:: :obj:`~hypothesis.settings.derandomize`
200- .. |~settings.phases| replace:: :obj:`~hypothesis.settings.phases`
201- .. |~settings.print_blob| replace:: :obj:`~hypothesis.settings.print_blob`
202- .. |~settings.report_multiple_bugs| replace:: :obj:`~hypothesis.settings.report_multiple_bugs`
203- .. |~settings.verbosity| replace:: :obj:`~hypothesis.settings.verbosity`
204- .. |~settings.suppress_health_check| replace:: :obj:`~hypothesis.settings.suppress_health_check`
205- .. |~settings.stateful_step_count| replace:: :obj:`~hypothesis.settings.stateful_step_count`
206- .. |~settings.backend| replace:: :obj:`~hypothesis.settings.backend`
207-
208- .. |HealthCheck.data_too_large| replace:: :obj:`HealthCheck.data_too_large <hypothesis.HealthCheck.data_too_large>`
209- .. |HealthCheck.filter_too_much| replace:: :obj:`HealthCheck.filter_too_much <hypothesis.HealthCheck.filter_too_much>`
210- .. |HealthCheck.too_slow| replace:: :obj:`HealthCheck.too_slow <hypothesis.HealthCheck.too_slow>`
211- .. |HealthCheck.function_scoped_fixture| replace:: \
212- :obj:`HealthCheck.function_scoped_fixture <hypothesis.HealthCheck.function_scoped_fixture>`
213- .. |HealthCheck.differing_executors| replace:: \
214- :obj:`HealthCheck.differing_executors <hypothesis.HealthCheck.differing_executors>`
215- .. |HealthCheck| replace:: :obj:`~hypothesis.HealthCheck`
216-
217- .. |Phase| replace:: :obj:`Phase <hypothesis.Phase>`
218- .. |Phase.explicit| replace:: :obj:`Phase.explicit <hypothesis.Phase.explicit>`
219- .. |Phase.reuse| replace:: :obj:`Phase.reuse <hypothesis.Phase.reuse>`
220- .. |Phase.generate| replace:: :obj:`Phase.generate <hypothesis.Phase.generate>`
221- .. |Phase.target| replace:: :obj:`Phase.target <hypothesis.Phase.target>`
222- .. |Phase.shrink| replace:: :obj:`Phase.shrink <hypothesis.Phase.shrink>`
223- .. |Phase.explain| replace:: :obj:`Phase.explain <hypothesis.Phase.explain>`
224-
225- .. |Verbosity| replace:: :obj:`~hypothesis.Verbosity`
226- .. |Verbosity.verbose| replace:: :obj:`Verbosity.verbose <hypothesis.Verbosity.verbose>`
227- .. |Verbosity.debug| replace:: :obj:`Verbosity.debug <hypothesis.Verbosity.debug>`
228- .. |Verbosity.normal| replace:: :obj:`Verbosity.normal <hypothesis.Verbosity.normal>`
229- .. |Verbosity.quiet| replace:: :obj:`Verbosity.quiet <hypothesis.Verbosity.quiet>`
230-
231- .. |InvalidArgument| replace:: :obj:`InvalidArgument <hypothesis.errors.InvalidArgument>`
232- .. |DidNotReproduce| replace:: :obj:`DidNotReproduce <hypothesis.errors.DidNotReproduce>`
233-
234- .. |st.lists| replace:: :func:`~hypothesis.strategies.lists`
235- .. |st.integers| replace:: :func:`~hypothesis.strategies.integers`
236- .. |st.floats| replace:: :func:`~hypothesis.strategies.floats`
237- .. |st.booleans| replace:: :func:`~hypothesis.strategies.booleans`
238- .. |st.none| replace:: :func:`~hypothesis.strategies.none`
239- .. |st.composite| replace:: :func:`@composite <hypothesis.strategies.composite>`
240- .. |st.data| replace:: :func:`~hypothesis.strategies.data`
241- .. |st.one_of| replace:: :func:`~hypothesis.strategies.one_of`
242- .. |st.text| replace:: :func:`~hypothesis.strategies.text`
243- .. |st.characters| replace:: :func:`~hypothesis.strategies.characters`
244- .. |st.tuples| replace:: :func:`~hypothesis.strategies.tuples`
245- .. |st.sets| replace:: :func:`~hypothesis.strategies.sets`
246- .. |st.dictionaries| replace:: :func:`~hypothesis.strategies.dictionaries`
247- .. |st.fixed_dictionaries| replace:: :func:`~hypothesis.strategies.fixed_dictionaries`
248- .. |st.datetimes| replace:: :func:`~hypothesis.strategies.datetimes`
249- .. |st.builds| replace:: :func:`~hypothesis.strategies.builds`
250- .. |st.recursive| replace:: :func:`~hypothesis.strategies.recursive`
251- .. |st.deferred| replace:: :func:`~hypothesis.strategies.deferred`
252- .. |st.from_type| replace:: :func:`~hypothesis.strategies.from_type`
253- .. |st.sampled_from| replace:: :func:`~hypothesis.strategies.sampled_from`
254- .. |st.uuids| replace:: :func:`~hypothesis.strategies.uuids`
255- .. |st.ip_addresses| replace:: :func:`~hypothesis.strategies.ip_addresses`
256- .. |st.register_type_strategy| replace:: :func:`~hypothesis.strategies.register_type_strategy`
257- .. |st.just| replace:: :func:`~hypothesis.strategies.just`
258- .. |st.domains| replace:: :func:`~hypothesis.provisional.domains`
259- .. |st.urls| replace:: :func:`~hypothesis.provisional.urls`
260-
261- .. |django.from_form| replace:: :func:`~hypothesis.extra.django.from_form`
262- .. |django.from_model| replace:: :func:`~hypothesis.extra.django.from_model`
263- .. |django.from_field| replace:: :func:`~hypothesis.extra.django.from_field`
264-
265- .. |settings.register_profile| replace:: :func:`~hypothesis.settings.register_profile`
266- .. |settings.get_profile| replace:: :func:`~hypothesis.settings.get_profile`
267- .. |settings.load_profile| replace:: :func:`~hypothesis.settings.load_profile`
268-
269- .. |SearchStrategy| replace:: :class:`~hypothesis.strategies.SearchStrategy`
270- .. |.filter| replace:: :func:`.filter() <hypothesis.strategies.SearchStrategy.filter>`
271- .. |.filter()| replace:: :func:`.filter() <hypothesis.strategies.SearchStrategy.filter>`
272- .. |.flatmap| replace:: :func:`.flatmap() <hypothesis.strategies.SearchStrategy.flatmap>`
273- .. |.flatmap()| replace:: :func:`.flatmap() <hypothesis.strategies.SearchStrategy.flatmap>`
274- .. |.map| replace:: :func:`.map() <hypothesis.strategies.SearchStrategy.map>`
275- .. |.map()| replace:: :func:`.map() <hypothesis.strategies.SearchStrategy.map>`
276- .. |.example()| replace:: :func:`.example() <hypothesis.strategies.SearchStrategy.example>`
277-
278- .. |PrimitiveProvider| replace:: :class:`~hypothesis.internal.conjecture.providers.PrimitiveProvider`
279- .. |PrimitiveProvider.draw_integer| replace:: \
280- :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.draw_integer`
281- .. |PrimitiveProvider.draw_boolean| replace:: \
282- :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.draw_boolean`
283- .. |PrimitiveProvider.draw_float| replace:: :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.draw_float`
284- .. |PrimitiveProvider.draw_string| replace:: :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.draw_string`
285- .. |PrimitiveProvider.draw_bytes| replace:: :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.draw_bytes`
286- .. |PrimitiveProvider.realize| replace:: :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.realize`
287- .. |PrimitiveProvider.on_observation| replace:: \
288- :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.on_observation`
289- .. |PrimitiveProvider.per_test_case_context_manager| replace:: \
290- :func:`~hypothesis.internal.conjecture.providers.PrimitiveProvider.per_test_case_context_manager`
291-
292- .. |AVAILABLE_PROVIDERS| replace:: :data:`~hypothesis.internal.conjecture.providers.AVAILABLE_PROVIDERS`
293- .. |TESTCASE_CALLBACKS| replace:: :data:`~hypothesis.internal.observability.TESTCASE_CALLBACKS`
294- .. |BUFFER_SIZE| replace:: :data:`~hypothesis.internal.conjecture.engine.BUFFER_SIZE`
295- .. |MAX_SHRINKS| replace:: :data:`~hypothesis.internal.conjecture.engine.MAX_SHRINKS`
296- .. |MAX_SHRINKING_SECONDS| replace:: :data:`~hypothesis.internal.conjecture.engine.MAX_SHRINKING_SECONDS`
297- .. |BackendCannotProceed| replace:: :exc:`~hypothesis.errors.BackendCannotProceed`
298-
299- .. |@rule| replace:: :func:`@rule <hypothesis.stateful.rule>`
300- .. |RuleBasedStateMachine| replace:: :class:`~hypothesis.stateful.RuleBasedStateMachine`
301-
302- .. |@reproduce_failure| replace:: :func:`@reproduce_failure <hypothesis.reproduce_failure>`
303- .. |@seed| replace:: :func:`@seed <hypothesis.seed>`
304-
305- .. |ExampleDatabase| replace:: :class:`~hypothesis.database.ExampleDatabase`
306- .. |ExampleDatabase.save| replace:: :func:`~hypothesis.database.ExampleDatabase.save`
307- .. |ExampleDatabase.delete| replace:: :func:`~hypothesis.database.ExampleDatabase.delete`
308- .. |ExampleDatabase.fetch| replace:: :func:`~hypothesis.database.ExampleDatabase.fetch`
309- .. |ExampleDatabase.move| replace:: :func:`~hypothesis.database.ExampleDatabase.move`
310- .. |ExampleDatabase.add_listener| replace:: :func:`~hypothesis.database.ExampleDatabase.add_listener`
311- .. |ExampleDatabase.remove_listener| replace:: :func:`~hypothesis.database.ExampleDatabase.remove_listener`
312- .. |ExampleDatabase.clear_listeners| replace:: :func:`~hypothesis.database.ExampleDatabase.clear_listeners`
313- .. |ExampleDatabase._start_listening| replace:: :func:`~hypothesis.database.ExampleDatabase._start_listening`
314- .. |ExampleDatabase._stop_listening| replace:: :func:`~hypothesis.database.ExampleDatabase._stop_listening`
315- .. |ExampleDatabase._broadcast_change| replace:: :func:`~hypothesis.database.ExampleDatabase._broadcast_change`
316-
317- .. |DirectoryBasedExampleDatabase| replace:: :class:`~hypothesis.database.DirectoryBasedExampleDatabase`
318- .. |InMemoryExampleDatabase| replace:: :class:`~hypothesis.database.InMemoryExampleDatabase`
319- .. |ReadOnlyDatabase| replace:: :class:`~hypothesis.database.ReadOnlyDatabase`
320- .. |MultiplexedDatabase| replace:: :class:`~hypothesis.database.MultiplexedDatabase`
321- .. |GitHubArtifactDatabase| replace:: :class:`~hypothesis.database.GitHubArtifactDatabase`
322- .. |BackgroundWriteDatabase| replace:: :class:`~hypothesis.database.BackgroundWriteDatabase`
323- .. |RedisExampleDatabase| replace:: :class:`~hypothesis.extra.redis.RedisExampleDatabase`
324-
325- .. |is_hypothesis_test| replace:: :func:`~hypothesis.is_hypothesis_test`
326-
327- .. |str| replace:: :obj:`python:str`
328- .. |int| replace:: :obj:`python:int`
329- .. |bool| replace:: :obj:`python:bool`
330- .. |bytes| replace:: :obj:`python:bytes`
331- .. |float| replace:: :obj:`python:float`
332- .. |assert| replace:: :keyword:`python:assert`
333- .. |dataclasses| replace:: :mod:`python:dataclasses`
334- """
169+ rst_prolog = (Path (__file__ ).parent / "prolog.rst" ).read_text ()
335170
336171codeautolink_autodoc_inject = False
337172codeautolink_global_preface = """
0 commit comments