jenkins-bot submitted this change.

View Change


Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
[doc] update UploadRobot documentation

Change-Id: I07a428bf4476214179a5ea5d9981755b1d9e94fb
---
M pywikibot/specialbots/_upload.py
1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/pywikibot/specialbots/_upload.py b/pywikibot/specialbots/_upload.py
index 9c217db..128d9bd 100644
--- a/pywikibot/specialbots/_upload.py
+++ b/pywikibot/specialbots/_upload.py
@@ -31,10 +31,10 @@
"""Upload bot."""

post_processor: Callable[[str, str | None], None] | None = None
- """If this attribute is set to a callable, the :meth:`run` method calls it
- after upload. The parameter passed to the callable is the origin *file_url*
- passed to the :meth:`upload` method and the filename returned from that
- method. It can be used like this:
+ """If this attribute is set to a callable, the :meth:`run` method
+ calls it after upload. The parameters passed to the callable is the
+ origin *file_url* passed to the :meth:`upload` method and the
+ *filename* returned from that method. It can be used like this:

.. code:: python

@@ -70,7 +70,6 @@

.. versionchanged:: 6.2
asynchronous upload is used if *asynchronous* parameter is set
-
.. versionchanged:: 6.4
*force_if_shared* parameter was added

@@ -78,7 +77,6 @@
to local files.
:param description: Description of file for its page. If multiple files
are uploading the same description is used for every file.
- :type description: str
:param use_filename: Specify title of the file's page. If multiple
files are uploading it asks to change the name for second, third,
etc. files, otherwise the last file will overwrite the other.
@@ -104,11 +102,10 @@
:param force_if_shared: Upload the file even if it's currently
shared to the target site (e.g. when moving from Commons to another
wiki)
- :keyword always: Disables any input, requires that either
+ :keyword bool always: Disables any input, requires that either
ignore_warning or aborts are set to True and that the
description is also set. It overwrites verify_description to
False and keep_filename to True.
- :type always: bool
"""
super().__init__(**kwargs)
if self.opt.always:

To view, visit change 1017109. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I07a428bf4476214179a5ea5d9981755b1d9e94fb
Gerrit-Change-Number: 1017109
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged