jenkins-bot submitted this change.
[doc] use `code-block` directive instead of `code`
but keep it in README.rst which is used by Github.
Change-Id: Ibb1c7fae346daeac6e8174d4fee650c4b81d79ce
---
M pywikibot/site/_generators.py
M pywikibot/specialbots/_upload.py
M pywikibot/textlib.py
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py
index bdb7b63..6d954e3 100644
--- a/pywikibot/site/_generators.py
+++ b/pywikibot/site/_generators.py
@@ -1001,7 +1001,7 @@
:ref:`Http Settings` in your ``user-config.py`` file. Or
increase it partially within your code like:
- .. code:: python
+ .. code-block:: python
from pywikibot import config
save_timeout = config.socket_timeout # save the timeout config
diff --git a/pywikibot/specialbots/_upload.py b/pywikibot/specialbots/_upload.py
index 7e3a8d8..c10f519 100644
--- a/pywikibot/specialbots/_upload.py
+++ b/pywikibot/specialbots/_upload.py
@@ -36,7 +36,7 @@
origin *file_url* passed to the :meth:`upload` method and the
*filename* returned from that method. It can be used like this:
- .. code:: python
+ .. code-block:: python
def summarize(old: str, new: str | None) -> None:
if new is None:
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index db243e7..8cc33a7 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -574,7 +574,7 @@
The parser is used by :func:`removeHTMLParts` similar to this:
- .. code:: python
+ .. code-block:: python
from contextlib import closing
from pywikibot.textlib import _GetDataHTML
@@ -586,7 +586,7 @@
The result is:
- .. code:: text
+ .. code-block:: html
<html>Test me!</html>
To view, visit change 1030534. To unsubscribe, or for help writing mail filters, visit settings.