lists.wikimedia.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
List overview
Download
Pywikibot-commits
December 2024
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
pywikibot-commits@lists.wikimedia.org
1 participants
114 discussions
Start a n
N
ew thread
[Gerrit] ...core[master]: doc: adjust classproperty docstrings for Python 3.12 and below
by Xqt (Code Review)
02 Dec '24
02 Dec '24
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099734?usp=email
) Change subject: doc: adjust classproperty docstrings for Python 3.12 and below ...................................................................... doc: adjust classproperty docstrings for Python 3.12 and below Bug: T381279 Change-Id: I22706940b1fc4f8ab401313495ff923cc6e9a634 --- M pywikibot/tools/__init__.py 1 file changed, 11 insertions(+), 3 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 7375d0d..d36f52c 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -180,11 +180,19 @@ """Initializer: hold the class method and documentation.""" self.method = cls_method self.__annotations__ = self.method.__annotations__ - self.__doc__ = (':class:`classproperty<tools.classproperty>` ' - f'{self.method.__doc__}') + doc = self.method.__doc__ + self.__doc__ = f':class:`classproperty<tools.classproperty>` {doc}' + rtype = self.__annotations__.get('return') if rtype: - self.__doc__ += f'\n\n:rtype: {rtype}' + lines = doc.splitlines() + + if len(lines) > 2 and PYTHON_VERSION < (3, 13): + spaces = ' ' * re.search('[^ ]', lines[2]).start() + else: + spaces = '' + + self.__doc__ += f'\n{spaces}:rtype: {rtype}' def __get__(self, instance, owner): """Get the attribute of the owner class by its method.""" -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099734?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I22706940b1fc4f8ab401313495ff923cc6e9a634 Gerrit-Change-Number: 1099734 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot
1
0
0
0
[Gerrit] ...core[master]: Add support for new wiki
by Meno25 (Code Review)
02 Dec '24
02 Dec '24
Meno25 has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099688?usp=email
) Change subject: Add support for new wiki ...................................................................... Add support for new wiki * idwikivoyage Bug: T381082 Change-Id: Ie097cf346093a7057776738cc002d477daa82102 --- M pywikibot/families/wikivoyage_family.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Meno25: Verified; Looks good to me, approved diff --git a/pywikibot/families/wikivoyage_family.py b/pywikibot/families/wikivoyage_family.py index bc541fc..9f0b942 100644 --- a/pywikibot/families/wikivoyage_family.py +++ b/pywikibot/families/wikivoyage_family.py @@ -18,8 +18,8 @@ codes = { 'bn', 'cs', 'de', 'el', 'en', 'eo', 'es', 'fa', 'fi', 'fr', 'he', 'hi', - 'it', 'ja', 'nl', 'pl', 'ps', 'pt', 'ro', 'ru', 'shn', 'sv', 'tr', - 'uk', 'vi', 'zh', + 'id', 'it', 'ja', 'nl', 'pl', 'ps', 'pt', 'ro', 'ru', 'shn', 'sv', + 'tr', 'uk', 'vi', 'zh', } category_redirect_templates = { -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099688?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Ie097cf346093a7057776738cc002d477daa82102 Gerrit-Change-Number: 1099688 Gerrit-PatchSet: 2 Gerrit-Owner: Meno25 <meno25mail(a)gmail.com> Gerrit-Reviewer: Meno25 <meno25mail(a)gmail.com> Gerrit-Reviewer: jenkins-bot Gerrit-CC: Xqt <info(a)gno.de>
1
0
0
0
[Gerrit] ...core[master]: doc: Remove duplicate family.Family entry
by Xqt (Code Review)
02 Dec '24
02 Dec '24
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099641?usp=email
) Change subject: doc: Remove duplicate family.Family entry ...................................................................... doc: Remove duplicate family.Family entry Change-Id: I355ee2ad8d5d3e91b406721e3efeae77c520495d --- M docs/api_ref/family.rst 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/docs/api_ref/family.rst b/docs/api_ref/family.rst index 9717a19..314d96a 100644 --- a/docs/api_ref/family.rst +++ b/docs/api_ref/family.rst @@ -4,6 +4,7 @@ .. automodule:: family :synopsis: Objects representing MediaWiki families + :exclude-members: Family .. autoclass:: Family -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099641?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I355ee2ad8d5d3e91b406721e3efeae77c520495d Gerrit-Change-Number: 1099641 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot
1
0
0
0
[Gerrit] ...core[master]: doc: Enable docstring with classproperty methods
by Xqt (Code Review)
01 Dec '24
01 Dec '24
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099361?usp=email
) Change subject: doc: Enable docstring with classproperty methods ...................................................................... doc: Enable docstring with classproperty methods - modify docstring of classproperty methods to show a preleading classproperty and add rtype if present. - return the modified decorator class when Sphinx is running. Bug: T380628 Change-Id: Ie44c9f89d34e7cf4aec332daf8cbed9b30ac0dc8 --- M pywikibot/tools/__init__.py 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 298f095..7375d0d 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -177,12 +177,20 @@ """ def __init__(self, cls_method) -> None: - """Hold the class method.""" + """Initializer: hold the class method and documentation.""" self.method = cls_method - self.__doc__ = self.method.__doc__ + self.__annotations__ = self.method.__annotations__ + self.__doc__ = (':class:`classproperty<tools.classproperty>` ' + f'{self.method.__doc__}') + rtype = self.__annotations__.get('return') + if rtype: + self.__doc__ += f'\n\n:rtype: {rtype}' def __get__(self, instance, owner): """Get the attribute of the owner class by its method.""" + if SPHINX_RUNNING: + return self + return self.method(owner) -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1099361?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Ie44c9f89d34e7cf4aec332daf8cbed9b30ac0dc8 Gerrit-Change-Number: 1099361 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot
1
0
0
0
← Newer
1
...
9
10
11
12
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
Results per page:
10
25
50
100
200