jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238704?usp=email )
Change subject: Move copyright headers above module docstrings
......................................................................
Move copyright headers above module docstrings
Bug: T416673
Change-Id: I636b86d3a905a0deeedb4bde21c8023588ccbd2c
---
M pywikibot/comms/__init__.py
M pywikibot/data/api/_generators.py
M pywikibot/exceptions.py
M pywikibot/fixes.py
M pywikibot/site/_siteinfo.py
M pywikibot/site/_tokenwallet.py
M pywikibot/tools/threading.py
M scripts/commonscat.py
M scripts/djvutext.py
M scripts/protect.py
M scripts/reflinks.py
M tests/basesite_tests.py
M tests/gui_tests.py
M tests/page_tests.py
M tests/site_generators_tests.py
M tests/siteinfo_tests.py
M tests/ui_tests.py
M tests/wbtypes_tests.py
18 files changed, 64 insertions(+), 63 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/comms/__init__.py b/pywikibot/comms/__init__.py
index 49a9027..9ed300a 100644
--- a/pywikibot/comms/__init__.py
+++ b/pywikibot/comms/__init__.py
@@ -1,6 +1,7 @@
-"""Communication layer."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Communication layer."""
+from __future__ import annotations
diff --git a/pywikibot/data/api/_generators.py
b/pywikibot/data/api/_generators.py
index 77ef85a..306fba2 100644
--- a/pywikibot/data/api/_generators.py
+++ b/pywikibot/data/api/_generators.py
@@ -1,14 +1,14 @@
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""Objects representing API/Query generators.
.. versionchanged:: 7.6
All Objects were changed from Iterable object to a Generator object.
They are subclassed from :class:`tools.collections.GeneratorWrapper`
"""
-#
-# (C) Pywikibot team, 2008-2026
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
from abc import ABC, abstractmethod
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index ac14c12..be179e8 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -1,3 +1,8 @@
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""**Pywikibot Exceptions** and warning classes.
This module contains all exception and warning classes used throughout
@@ -171,11 +176,6 @@
``Server414Error`` class is deprecated; use :class:`Client414Error`
instead.
"""
-#
-# (C) Pywikibot team, 2008-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import re
diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py
index 22f0805..1a29c03 100644
--- a/pywikibot/fixes.py
+++ b/pywikibot/fixes.py
@@ -1,13 +1,13 @@
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""File containing all standard fixes.
.. versionremoved:: 11.0
The ``yu-tld`` predefined fix was removed.
"""
-#
-# (C) Pywikibot team, 2008-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
from pathlib import Path
diff --git a/pywikibot/site/_siteinfo.py b/pywikibot/site/_siteinfo.py
index b428850..17c187f 100644
--- a/pywikibot/site/_siteinfo.py
+++ b/pywikibot/site/_siteinfo.py
@@ -1,9 +1,9 @@
-"""Objects representing site info data contents."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Objects representing site info data contents."""
from __future__ import annotations
import copy
diff --git a/pywikibot/site/_tokenwallet.py b/pywikibot/site/_tokenwallet.py
index d2410da..9608682 100644
--- a/pywikibot/site/_tokenwallet.py
+++ b/pywikibot/site/_tokenwallet.py
@@ -1,9 +1,9 @@
-"""Objects representing api tokens."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Objects representing api tokens."""
from __future__ import annotations
from collections.abc import Container
diff --git a/pywikibot/tools/threading.py b/pywikibot/tools/threading.py
index 83c40de..93e7af6 100644
--- a/pywikibot/tools/threading.py
+++ b/pywikibot/tools/threading.py
@@ -1,9 +1,9 @@
-"""Classes which can be used for threading."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Classes which can be used for threading."""
from __future__ import annotations
import dataclasses
diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index b89ab6b..78d8b88 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -1,4 +1,15 @@
#!/usr/bin/env python3
+# Commonscat bot:
+#
+# Take a page. Follow the interwiki's and look for the commonscat template
+# *Found zero templates. Done.
+# *Found one template. Add this template
+# *Found more templates. Ask the user <- still have to implement this
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""With this tool you can add the template {{commonscat}} to categories.
The tool works by following the interwiki links. If the template is
@@ -33,17 +44,6 @@
python pwb.py commonscat -start:Category:!
"""
-# Commonscat bot:
-#
-# Take a page. Follow the interwiki's and look for the commonscat template
-# *Found zero templates. Done.
-# *Found one template. Add this template
-# *Found more templates. Ask the user <- still have to implement this
-#
-# (C) Pywikibot team, 2008-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import re
diff --git a/scripts/djvutext.py b/scripts/djvutext.py
index 845520e..3238483 100755
--- a/scripts/djvutext.py
+++ b/scripts/djvutext.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""This bot uploads text from DjVu files onto pages in the "Page" namespace.
.. note:: This script is intended to be used for Wikisource.
@@ -34,11 +39,6 @@
-always Do not prompt for confirmation before making changes.
"""
-#
-# (C) Pywikibot team, 2008-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import os.path
diff --git a/scripts/protect.py b/scripts/protect.py
index b462e7a..8c0a337 100755
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -1,4 +1,11 @@
#!/usr/bin/env python3
+#
+# Created by modifying delete.py
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""This script can be used to protect and unprotect pages en masse.
Of course, you will need an admin account on the relevant wiki.
@@ -53,13 +60,6 @@
python pwb.py protect -file:unprotect.txt -unprotect -always
"""
-#
-# Created by modifying delete.py
-#
-# (C) Pywikibot team, 2008-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import pywikibot
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 24edb1c..7ec9595 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -1,4 +1,8 @@
#!/usr/bin/env python3
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""Fetch and add titles for bare links in references.
This bot will search for references which are only made of a link
@@ -45,10 +49,6 @@
¶ms;
"""
-# (C) Pywikibot team, 2008-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import http.client as httplib
diff --git a/tests/basesite_tests.py b/tests/basesite_tests.py
index 40e455e..da2c543 100755
--- a/tests/basesite_tests.py
+++ b/tests/basesite_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for the site module."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the site module."""
from __future__ import annotations
import unittest
diff --git a/tests/gui_tests.py b/tests/gui_tests.py
index 9ff4a7d..24d235d 100755
--- a/tests/gui_tests.py
+++ b/tests/gui_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for the Tk UI."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the Tk UI."""
from __future__ import annotations
import os
diff --git a/tests/page_tests.py b/tests/page_tests.py
index 8d42776..8309042 100755
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for the page module."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the page module."""
from __future__ import annotations
import pickle
diff --git a/tests/site_generators_tests.py b/tests/site_generators_tests.py
index a538773..8a82fe6 100755
--- a/tests/site_generators_tests.py
+++ b/tests/site_generators_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for generators of the site module."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for generators of the site module."""
from __future__ import annotations
import unittest
diff --git a/tests/siteinfo_tests.py b/tests/siteinfo_tests.py
index 4cb7165..2675861 100755
--- a/tests/siteinfo_tests.py
+++ b/tests/siteinfo_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for the site module."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the site module."""
from __future__ import annotations
import re
diff --git a/tests/ui_tests.py b/tests/ui_tests.py
index 00e09a5..364fa0f 100755
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for the user interface."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the user interface."""
from __future__ import annotations
import io
diff --git a/tests/wbtypes_tests.py b/tests/wbtypes_tests.py
index e1e0a47..9e161aa 100755
--- a/tests/wbtypes_tests.py
+++ b/tests/wbtypes_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for the Wikidata parts of the page module."""
#
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the Wikidata parts of the page module."""
from __future__ import annotations
import datetime
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238704?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: I636b86d3a905a0deeedb4bde21c8023588ccbd2c
Gerrit-Change-Number: 1238704
Gerrit-PatchSet: 5
Gerrit-Owner: Stitipragyan barik <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]