Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238707?usp=email )
Change subject: Move copyright headers above module docstrings
......................................................................
Move copyright headers above module docstrings
Bug: T416673
Change-Id: I43dacdab216d021eb24d01815c13c1a69baf9186
---
M pywikibot/logging.py
M pywikibot/plural.py
M pywikibot/scripts/generate_family_file.py
M pywikibot/site/_upload.py
M pywikibot/site_detect.py
M scripts/claimit.py
M scripts/delete.py
M scripts/maintenance/make_i18n_dict.py
M scripts/parser_function_count.py
M scripts/patrol.py
M tests/cache_tests.py
M tests/dry_api_tests.py
M tests/login_tests.py
M tests/pagegenerators_tests.py
M tests/textlib_tests.py
M tests/utils.py
M tests/xmlreader_tests.py
17 files changed, 58 insertions(+), 58 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/logging.py b/pywikibot/logging.py
index cd60dcb..c95a808 100644
--- a/pywikibot/logging.py
+++ b/pywikibot/logging.py
@@ -1,3 +1,8 @@
+#
+# (C) Pywikibot team, 2010-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""User output/logging functions.
Six output functions are defined. Each requires a ``msg`` argument
@@ -23,11 +28,6 @@
- :pyhow:`Logging HOWTO<logging>`
- :python:`Logging Cookbook<howto/logging-cookbook.html>`
"""
-#
-# (C) Pywikibot team, 2010-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
diff --git a/pywikibot/plural.py b/pywikibot/plural.py
index 081a454..289404f 100644
--- a/pywikibot/plural.py
+++ b/pywikibot/plural.py
@@ -1,9 +1,9 @@
-"""Module containing plural rules of various languages."""
#
-# (C) Pywikibot team, 2011-2025
+# (C) Pywikibot team, 2011-2026
#
# Distributed under the terms of the MIT license.
#
+"""Module containing plural rules of various languages."""
from __future__ import annotations
from typing import TYPE_CHECKING
diff --git a/pywikibot/scripts/generate_family_file.py
b/pywikibot/scripts/generate_family_file.py
index 72c7d2c..ddf78a1 100755
--- a/pywikibot/scripts/generate_family_file.py
+++ b/pywikibot/scripts/generate_family_file.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2010-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""This script generates a family file from a given URL.
This script must be invoked with the pwb wrapper script/code entry point.
@@ -31,11 +36,6 @@
.. versionchanged:: 8.4
If the url scheme is missing, ``https`` will be used.
"""
-#
-# (C) Pywikibot team, 2010-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import re
diff --git a/pywikibot/site/_upload.py b/pywikibot/site/_upload.py
index 9ce19a1..8b2dbf3 100644
--- a/pywikibot/site/_upload.py
+++ b/pywikibot/site/_upload.py
@@ -1,9 +1,9 @@
-"""Objects representing API upload to MediaWiki sites."""
#
-# (C) Pywikibot team, 2009-2025
+# (C) Pywikibot team, 2009-2026
#
# Distributed under the terms of the MIT license.
#
+"""Objects representing API upload to MediaWiki sites."""
from __future__ import annotations
import mimetypes
diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py
index 97f59d3..70286dd 100644
--- a/pywikibot/site_detect.py
+++ b/pywikibot/site_detect.py
@@ -1,9 +1,9 @@
-"""Classes for detecting a MediaWiki site."""
#
-# (C) Pywikibot team, 2010-2025
+# (C) Pywikibot team, 2010-2026
#
# Distributed under the terms of the MIT license.
#
+"""Classes for detecting a MediaWiki site."""
from __future__ import annotations
import json
diff --git a/scripts/claimit.py b/scripts/claimit.py
index 2ed502f..413830e 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2013-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""A script that adds claims to Wikidata items based on a list of pages.
These command line parameters can be used to specify which pages to work on:
@@ -43,11 +48,6 @@
Note that the ordering of the letters in the 'exists' argument does not matter,
but 'p' must be included.
"""
-#
-# (C) Pywikibot team, 2013-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import pywikibot
diff --git a/scripts/delete.py b/scripts/delete.py
index b18e82f..0a82deb 100755
--- a/scripts/delete.py
+++ b/scripts/delete.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2013-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""This script can be used to delete and undelete pages en masse.
Of course, you will need an admin account on the relevant wiki.
@@ -51,11 +56,6 @@
python pwb.py delete -cat:"To delete" -always
"""
-#
-# (C) Pywikibot team, 2013-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import collections
diff --git a/scripts/maintenance/make_i18n_dict.py
b/scripts/maintenance/make_i18n_dict.py
index 1a1ae26..701caba 100755
--- a/scripts/maintenance/make_i18n_dict.py
+++ b/scripts/maintenance/make_i18n_dict.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2013-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""Generate an i18n file from a given script.
Run IDLE at topmost level:
@@ -29,11 +34,6 @@
>>> bot.to_json()
"""
-#
-# (C) Pywikibot team, 2013-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import json
diff --git a/scripts/parser_function_count.py b/scripts/parser_function_count.py
index 60c02ed..6c74556 100755
--- a/scripts/parser_function_count.py
+++ b/scripts/parser_function_count.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2013-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""Used to find expensive templates that are subject to be converted to Lua.
It counts parser functions and then orders templates by number of these
@@ -42,11 +47,6 @@
Should you specify neither first nor atleast, all templates using parser
functions will be listed.
"""
-#
-# (C) Pywikibot team, 2013-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import re
diff --git a/scripts/patrol.py b/scripts/patrol.py
index c699385..ced9a77 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2011-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""The bot is meant to mark the edits based on info obtained by whitelist.
This bot obtains a list of recent changes and newpages and marks the
@@ -39,11 +44,6 @@
(default for any project except Wikipedia Projects)
-usercontribs Filter generators above to the given user
"""
-#
-# (C) Pywikibot team, 2011-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import time
diff --git a/tests/cache_tests.py b/tests/cache_tests.py
index d9671e1..7b0d959 100755
--- a/tests/cache_tests.py
+++ b/tests/cache_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""API Request cache tests."""
#
-# (C) Pywikibot team, 2012-2025
+# (C) Pywikibot team, 2012-2026
#
# Distributed under the terms of the MIT license.
#
+"""API Request cache tests."""
from __future__ import annotations
import re
diff --git a/tests/dry_api_tests.py b/tests/dry_api_tests.py
index 3f5520b..3f0b19d 100755
--- a/tests/dry_api_tests.py
+++ b/tests/dry_api_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""API tests which do not interact with a site."""
#
-# (C) Pywikibot team, 2012-2025
+# (C) Pywikibot team, 2012-2026
#
# Distributed under the terms of the MIT license.
#
+"""API tests which do not interact with a site."""
from __future__ import annotations
import datetime
diff --git a/tests/login_tests.py b/tests/login_tests.py
index d2cdc29..8c85b20 100755
--- a/tests/login_tests.py
+++ b/tests/login_tests.py
@@ -1,13 +1,13 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2012-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""Tests for LoginManager classes.
e.g. used to test password-file based login.
"""
-#
-# (C) Pywikibot team, 2012-2025
-#
-# Distributed under the terms of the MIT license.
-#
from __future__ import annotations
import builtins
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 2cf9661..f4985db 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
-"""Test pagegenerators module."""
#
-# (C) Pywikibot team, 2009-2025
+# (C) Pywikibot team, 2009-2026
#
# Distributed under the terms of the MIT license.
+"""Test pagegenerators module."""
from __future__ import annotations
import calendar
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py
index 0bb7daa..d6af780 100755
--- a/tests/textlib_tests.py
+++ b/tests/textlib_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Test textlib module."""
#
-# (C) Pywikibot team, 2011-2025
+# (C) Pywikibot team, 2011-2026
#
# Distributed under the terms of the MIT license.
#
+"""Test textlib module."""
from __future__ import annotations
import functools
diff --git a/tests/utils.py b/tests/utils.py
index afe9743..318740d 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,9 +1,9 @@
-"""Test utilities."""
#
-# (C) Pywikibot team, 2013-2025
+# (C) Pywikibot team, 2013-2026
#
# Distributed under the terms of the MIT license.
#
+"""Test utilities."""
from __future__ import annotations
import inspect
diff --git a/tests/xmlreader_tests.py b/tests/xmlreader_tests.py
index c53afdc..dfd7e63 100755
--- a/tests/xmlreader_tests.py
+++ b/tests/xmlreader_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
-"""Tests for xmlreader module."""
#
-# (C) Pywikibot team, 2009-2025
+# (C) Pywikibot team, 2009-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for xmlreader module."""
from __future__ import annotations
import unittest
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238707?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: I43dacdab216d021eb24d01815c13c1a69baf9186
Gerrit-Change-Number: 1238707
Gerrit-PatchSet: 9
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]