jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1152074?usp=email )
Change subject: IMPR: Only show the description passed to the if it is to be verified ......................................................................
IMPR: Only show the description passed to the if it is to be verified
Bug: T394895 Change-Id: I4c05695640e28992a35ee93f99b4084e19d3bf7f --- M pywikibot/specialbots/_upload.py 1 file changed, 7 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/specialbots/_upload.py b/pywikibot/specialbots/_upload.py index 69abe2a..acbf01c 100644 --- a/pywikibot/specialbots/_upload.py +++ b/pywikibot/specialbots/_upload.py @@ -3,7 +3,7 @@ Do not import classes directly from here but from specialbots. """ # -# (C) Pywikibot team, 2003-2024 +# (C) Pywikibot team, 2003-2025 # # Distributed under the terms of the MIT license. # @@ -238,6 +238,10 @@ def process_filename(self, file_url: str) -> str | None: """Return base filename portion of *file_url*.
+ .. versionchanged:: 10.2 + no longer shows the description if UploadRobot's parameter + *verify_description* is set to False. + :param file_url: either a URL or a local file path """ # Isolate the pure name @@ -331,9 +335,8 @@ continue break
- # A proper description for the submission. - # Empty descriptions are not accepted. - if self.description: + # Show the description to verify it for the submission + if self.description and self.verify_description: pywikibot.info( f'The suggested description is:\n{self.description}')
pywikibot-commits@lists.wikimedia.org