From 9c527adc1d1f4087253deb23bb3dd110bba6dd4f Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 20 Apr 2026 19:25:13 +0100 Subject: [PATCH] README: Use code-block for all Python blocks This gives us syntax highlighting in the README on PyPI and GitHub. Signed-off-by: Stephen Finucane --- README.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index d731418..4416e5b 100644 --- a/README.rst +++ b/README.rst @@ -115,7 +115,9 @@ pointing to an allocated resource, which is the result of calling ``resource_manager.getResource()``. ``finishedWith`` will be called on each resource during tearDown(). -For example:: +For example: + +.. code-block:: python class TestLog(testresources.ResourcedTestCase): @@ -161,7 +163,9 @@ overriding these methods: whether ``TestResourceManager.dirtied`` has been called or any of the dependency resources are dirty. -For instance:: +For instance: + +.. code-block:: python class TemporaryDirectoryResource(TestResourceManager): @@ -179,7 +183,9 @@ For instance:: The ``resources`` list on the TestResourceManager object is used to declare dependencies. For instance, a DataBaseResource that needs a TemporaryDirectory -might be declared with a resources list:: +might be declared with a resources list: + +.. code-block:: python class DataBaseResource(TestResourceManager):