From 6a90d7206916ee3ab3608e66fdf5c85516078458 Mon Sep 17 00:00:00 2001 From: Adrian Herrmann Date: Thu, 10 Nov 2022 12:12:46 +0100 Subject: async: Fix formatting in rst documentation Indentations were wrong. Task-number: PYSIDE-769 Change-Id: If021423787959d940e92cbc75624430adf5d03ce Reviewed-by: Friedemann Kleint (cherry picked from commit 2a71960d3ff3640b3dcb0c1b1eb004bbb3eaea4d) Reviewed-by: Qt Cherry-pick Bot --- examples/async/eratosthenes/doc/eratosthenes.rst | 16 ++++++++-------- examples/async/minimal/doc/minimal.rst | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/async/eratosthenes/doc/eratosthenes.rst b/examples/async/eratosthenes/doc/eratosthenes.rst index 37758e99f..fdb095a91 100644 --- a/examples/async/eratosthenes/doc/eratosthenes.rst +++ b/examples/async/eratosthenes/doc/eratosthenes.rst @@ -22,20 +22,20 @@ implemented: `eratosthenes` and `minimal`: :width: 400 * `eratosthenes` is a more extensive example that visualizes the Sieve of -Eratosthenes algorithm. This algorithm per se is not one that is particularly -suitable for asynchronous operations as it's not I/O-heavy, but synchronizing -coroutines to a configurable tick allows for a good visualization. + Eratosthenes algorithm. This algorithm per se is not one that is particularly + suitable for asynchronous operations as it's not I/O-heavy, but synchronizing + coroutines to a configurable tick allows for a good visualization. * `minimal` is a minimal example featuring a button that triggers an -asynchronous coroutine with a sleep. It is designed to highlight which -boilerplate code is essential for an async program with Qt and offers a -starting point for more complex programs. + asynchronous coroutine with a sleep. It is designed to highlight which + boilerplate code is essential for an async program with Qt and offers a + starting point for more complex programs. Both examples feature: 1. A window class. 2. An `AsyncHelper` class containing `start_guest_run` plus helpers and -callbacks necessary for its invocation. The entry point for the Trio guest run -is provided as an argument from outside, which can be any async function. + callbacks necessary for its invocation. The entry point for the Trio guest + run is provided as an argument from outside, which can be any async function. While `eratosthenes` offloads the asynchronous logic that will run in trio's event loop into a separate class, `minimal` demonstrates that async functions diff --git a/examples/async/minimal/doc/minimal.rst b/examples/async/minimal/doc/minimal.rst index a72e8a73c..dcab2fe29 100644 --- a/examples/async/minimal/doc/minimal.rst +++ b/examples/async/minimal/doc/minimal.rst @@ -21,20 +21,20 @@ implemented: `eratosthenes` and `minimal`: :alt: Async example: Minimal * `eratosthenes` is a more extensive example that visualizes the Sieve of -Eratosthenes algorithm. This algorithm per se is not one that is particularly -suitable for asynchronous operations as it's not I/O-heavy, but synchronizing -coroutines to a configurable tick allows for a good visualization. + Eratosthenes algorithm. This algorithm per se is not one that is particularly + suitable for asynchronous operations as it's not I/O-heavy, but synchronizing + coroutines to a configurable tick allows for a good visualization. * `minimal` is a minimal example featuring a button that triggers an -asynchronous coroutine with a sleep. It is designed to highlight which -boilerplate code is essential for an async program with Qt and offers a -starting point for more complex programs. + asynchronous coroutine with a sleep. It is designed to highlight which + boilerplate code is essential for an async program with Qt and offers a + starting point for more complex programs. Both examples feature: 1. A window class. 2. An `AsyncHelper` class containing `start_guest_run` plus helpers and -callbacks necessary for its invocation. The entry point for the Trio guest run -is provided as an argument from outside, which can be any async function. + callbacks necessary for its invocation. The entry point for the Trio guest + run is provided as an argument from outside, which can be any async function. While `eratosthenes` offloads the asynchronous logic that will run in trio's event loop into a separate class, `minimal` demonstrates that async functions -- cgit v1.2.3