@@ -282,46 +282,71 @@ This class inherits from :any:`Reporter`.
282282.. [#sortof] Sort of, please see the note above.
283283)pbdoc");
284284
285- py::enum_<Runner::state> state(m, "Runner.state", R"pbdoc(
286- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
287- has been called since construction or the last call to :any:`init`.
288- )pbdoc");
289- state
290- .value("never_run", Runner::state::never_run, R"pbdoc(
291- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
292- has been called since construction or the last call to :any:`init`.
293- )pbdoc")
294- .value("running_to_finish", Runner::state::running_to_finish, R"pbdoc(
295- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
296- has been called since construction or the last call to :any:`init`.
297- )pbdoc")
298- .value("running_for", Runner::state::running_for, R"pbdoc(
299- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
300- has been called since construction or the last call to :any:`init`.
301- )pbdoc")
302- .value("running_until", Runner::state::running_until, R"pbdoc(
303- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
304- has been called since construction or the last call to :any:`init`.
305- )pbdoc")
306- .value("timed_out", Runner::state::timed_out, R"pbdoc(
307- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
308- has been called since construction or the last call to :any:`init`.
309- )pbdoc")
310- .value("stopped_by_predicate",
311- Runner::state::stopped_by_predicate,
312- R"pbdoc(
313- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
314- has been called since construction or the last call to :any:`init`.
315- )pbdoc")
316- .value("not_running", Runner::state::not_running, R"pbdoc(
317- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
318- has been called since construction or the last call to :any:`init`.
319- )pbdoc")
320- .value("dead", Runner::state::dead, R"pbdoc(
321- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
322- has been called since construction or the last call to :any:`init`.
285+ py::options options;
286+ options.disable_enum_members_docstring();
287+ py::enum_<Runner::state> state(thing, "state", R"pbdoc(
288+ The values in this enum are used to indicate the state of a runner.
289+
290+ The valid values are:
291+
292+ .. py:attribute:: state.never_run
293+ :value: <state.never_run: 0>
294+
295+ Indicates that none of :any:`Runner.run`, :any:`Runner.run_for`, or
296+ :any:`Runner.run_until` has been called since construction or the last call
297+ to :any:`Runner.init`.
298+
299+ .. py:attribute:: state.running_to_finish
300+ :value: <state.running_to_finish: 1>
301+
302+ Indicates that the Runner is currently running to the finish (via
303+ :any:`Runner.run`).
304+
305+ .. py:attribute:: state.running_for
306+ :value: <state.running_for: 2>
307+
308+ Indicates that the Runner is currently running for a specific amount of time
309+ (via :any:`Runner.run_for`).
310+
311+ .. py:attribute:: state.running_until
312+ :value: <state.running_until: 3>
313+
314+ Indicates that the Runner is currently running until some condition is met
315+ (via :any:`Runner.run_until`).
316+
317+ .. py:attribute:: state.timed_out
318+ :value: <state.timed_out: 4>
319+
320+ Indicates that the Runner was run via :any:`Runner.run_for` for a specific
321+ amount of time and that time has elapsed.
322+
323+ .. py:attribute:: state.stopped_by_predicate
324+ :value: <state.stopped_by_predicate: 6>
325+
326+ Indicates that the Runner was run via :any:`Runner.run_until` until the
327+ condition specified by the argument to :any:`Runner.run_until` was met.
328+
329+ .. py:attribute:: state.not_running
330+ :value: <state.not_running: 7>
331+
332+ Indicates that the Runner is not in any of the previous states and is not
333+ currently running. This can occur when, for example, :any:`Runner.run`
334+ throws an exception.
335+
336+ .. py:attribute:: state.dead
337+ :value: <state.dead: 8>
338+
339+ Indicates that the Runner was killed (by another thread).
323340)pbdoc");
324- thing.attr("state") = state;
341+ state.value("never_run", Runner::state::never_run)
342+ .value("running_to_finish", Runner::state::running_to_finish)
343+ .value("running_for", Runner::state::running_for)
344+ .value("running_until", Runner::state::running_until)
345+ .value("timed_out", Runner::state::timed_out)
346+ .value("stopped_by_predicate", Runner::state::stopped_by_predicate)
347+ .value("not_running", Runner::state::not_running)
348+ .value("dead", Runner::state::dead);
349+
325350 thing.def(
326351 "init",
327352 [](Runner& r) -> Runner& { return r.init(); },
@@ -361,7 +386,7 @@ any derived class of :any:`Runner`.
361386
362387.. seealso:: :any:`run_for`)pbdoc");
363388 thing.def("run_until",
364- (void (Runner::*)(std::function<bool()>&)) &Runner::run_until,
389+ (void(Runner::*)(std::function<bool()>&)) & Runner::run_until,
365390 py::arg("func"),
366391 R"pbdoc(
367392Run until a nullary predicate returns true or finished.
0 commit comments