11# Copyright 2016, Yahoo Inc.
22# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
3- """:term:`configurations` for network execution, and utilities on them."""
3+ """
4+ :term:`configurations` for network execution, and utilities on them.
5+
6+ .. seealso:: methods :func:`.plot.active_plotter_plugged()`, :func:`.plot.set_active_plotter()`,
7+ :func:`.plot.get_active_plotter()`
8+
9+ Plot configrations were not defined here, not to pollute import space early,
10+ until they are actually needed.
11+ """
412import ctypes
513from contextlib import contextmanager
614from contextvars import ContextVar
@@ -47,7 +55,9 @@ def _tristate_armed(context_var: ContextVar, enabled):
4755
4856
4957debug = partial (_tristate_armed , _debug )
50- """Like :func:`set_debug()` as a context-manager to reset old value. """
58+ """
59+ Like :func:`set_debug()` as a context-manager, resetting back to old value.
60+ """
5161is_debug = partial (_getter , _debug )
5262"""see :func:`set_debug()`"""
5363set_debug = partial (_tristate_set , _debug )
@@ -84,7 +94,9 @@ def is_abort():
8494
8595
8696evictions_skipped = partial (_tristate_armed , _skip_evictions )
87- """Like :func:`set_skip_evictions()` as a context-manager to reset old value. """
97+ """
98+ Like :func:`set_skip_evictions()` as a context-manager, resetting back to old value.
99+ """
88100is_skip_evictions = partial (_getter , _skip_evictions )
89101"""see :func:`set_skip_evictions()`"""
90102set_skip_evictions = partial (_tristate_set , _skip_evictions )
@@ -100,7 +112,9 @@ def is_abort():
100112
101113@contextmanager
102114def execution_pool_plugged (pool : "Optional[Pool]" ):
103- """Like :func:`set_execution_pool()` as a context-manager to reset old value. """
115+ """
116+ Like :func:`set_execution_pool()` as a context-manager, resetting back to old value.
117+ """
104118 resetter = _execution_pool .set (pool )
105119 try :
106120 yield
@@ -124,7 +138,9 @@ def get_execution_pool() -> "Optional[Pool]":
124138
125139
126140tasks_in_parallel = partial (_tristate_armed , _parallel_tasks )
127- """Like :func:`set_parallel_tasks()` as a context-manager to reset old value. """
141+ """
142+ Like :func:`set_parallel_tasks()` as a context-manager, resetting back to old value.
143+ """
128144is_parallel_tasks = partial (_getter , _parallel_tasks )
129145"""see :func:`set_parallel_tasks()`"""
130146set_parallel_tasks = partial (_tristate_set , _parallel_tasks )
@@ -141,7 +157,9 @@ def get_execution_pool() -> "Optional[Pool]":
141157
142158
143159tasks_marshalled = partial (_tristate_armed , _marshal_tasks )
144- """Like :func:`set_marshal_tasks()` as a context-manager to reset old value. """
160+ """
161+ Like :func:`set_marshal_tasks()` as a context-manager, resetting back to old value.
162+ """
145163is_marshal_tasks = partial (_getter , _marshal_tasks )
146164"""see :func:`set_marshal_tasks()`"""
147165set_marshal_tasks = partial (_tristate_set , _marshal_tasks )
@@ -160,7 +178,9 @@ def get_execution_pool() -> "Optional[Pool]":
160178
161179
162180operations_endured = partial (_tristate_armed , _endure_operations )
163- """Like :func:`set_endure_operations()` as a context-manager to reset old value. """
181+ """
182+ Like :func:`set_endure_operations()` as a context-manager, resetting back to old value.
183+ """
164184is_endure_operations = partial (_getter , _endure_operations )
165185"""see :func:`set_endure_operations()`"""
166186set_endure_operations = partial (_tristate_set , _endure_operations )
@@ -178,7 +198,9 @@ def get_execution_pool() -> "Optional[Pool]":
178198
179199
180200operations_reschedullled = partial (_tristate_armed , _reschedule_operations )
181- """Like :func:`set_reschedule_operations()` as a context-manager to reset old value. """
201+ """
202+ Like :func:`set_reschedule_operations()` as a context-manager, resetting back to old value.
203+ """
182204is_reschedule_operations = partial (_getter , _reschedule_operations )
183205"""see :func:`set_reschedule_operations()`"""
184206set_reschedule_operations = partial (_tristate_set , _reschedule_operations )
0 commit comments