jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238722?usp=email )
Change subject: Move copyright headers above module docstrings
......................................................................
Move copyright headers above module docstrings
Bug: T416673
Change-Id: I7e1a632a1b1e4691d064b216c22cc3066d96d6cf
---
M make_dist.py
M pywikibot/data/mysql.py
M pywikibot/data/sparql.py
M pywikibot/data/superset.py
M pywikibot/page/_toolforge.py
M pywikibot/scripts/__init__.py
M pywikibot/tools/_unidata.py
M scripts/change_pagelang.py
M scripts/maintenance/addwikis.py
M tests/add_text_tests.py
M tests/collections_tests.py
M tests/diff_tests.py
M tests/eventstreams_tests.py
M tests/generate_family_file_tests.py
M tests/generate_user_files_tests.py
M tests/interwikimap_tests.py
M tests/noreferences_tests.py
M tests/redirect_bot_tests.py
M tests/setup_tests.py
M tests/superset_tests.py
M tests/titletranslate_tests.py
M tests/user_tests.py
M tests/wikiblame_tests.py
23 files changed, 72 insertions(+), 49 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/make_dist.py b/make_dist.py
index 238928a..da290b8 100755
--- a/make_dist.py
+++ b/make_dist.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2022-2025
+#
+# Distributed under the terms of the MIT license.
+#
"""Script to create a new distribution.
The following options are supported:
@@ -51,11 +56,7 @@
.. versionchanged:: 9.4
The pywikibot-scripts distribution can be created.
"""
-#
-# (C) Pywikibot team, 2022-2025
-#
-# Distributed under the terms of the MIT license.
-#
+
from __future__ import annotations
import abc
diff --git a/pywikibot/data/mysql.py b/pywikibot/data/mysql.py
index a171b30..324568c 100644
--- a/pywikibot/data/mysql.py
+++ b/pywikibot/data/mysql.py
@@ -1,9 +1,10 @@
-"""Miscellaneous helper functions for mysql queries."""
#
# (C) Pywikibot team, 2016-2025
#
# Distributed under the terms of the MIT license.
#
+"""Miscellaneous helper functions for mysql queries."""
+
from __future__ import annotations
import pywikibot
diff --git a/pywikibot/data/sparql.py b/pywikibot/data/sparql.py
index 01298a3..972d8a5 100644
--- a/pywikibot/data/sparql.py
+++ b/pywikibot/data/sparql.py
@@ -1,9 +1,10 @@
-"""SPARQL Query interface."""
#
# (C) Pywikibot team, 2016-2025
#
# Distributed under the terms of the MIT license.
#
+"""SPARQL Query interface."""
+
from __future__ import annotations
from textwrap import fill
diff --git a/pywikibot/data/superset.py b/pywikibot/data/superset.py
index d07ade8..d924ff6 100644
--- a/pywikibot/data/superset.py
+++ b/pywikibot/data/superset.py
@@ -1,3 +1,8 @@
+#
+# (C) Pywikibot team, 2024-2025
+#
+# Distributed under the terms of the MIT license.
+#
"""Superset Query interface.
.. attention::
@@ -6,11 +11,7 @@
.. versionadded:: 9.2
"""
-#
-# (C) Pywikibot team, 2024-2025
-#
-# Distributed under the terms of the MIT license.
-#
+
from __future__ import annotations
from http import HTTPStatus
diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py
index 7e80c78..56f6be3 100644
--- a/pywikibot/page/_toolforge.py
+++ b/pywikibot/page/_toolforge.py
@@ -1,12 +1,13 @@
-"""Object representing interface to toolforge tools.
-
-.. versionadded:: 7.7
-"""
#
# (C) Pywikibot team, 2022-2025
#
# Distributed under the terms of the MIT license.
#
+"""Object representing interface to toolforge tools.
+
+.. versionadded:: 7.7
+"""
+
from __future__ import annotations
import collections
diff --git a/pywikibot/scripts/__init__.py b/pywikibot/scripts/__init__.py
index 415cf12..dd366f9 100644
--- a/pywikibot/scripts/__init__.py
+++ b/pywikibot/scripts/__init__.py
@@ -1,3 +1,8 @@
+#
+# (C) Pywikibot team, 2021-2025
+#
+# Distributed under the terms of the MIT license.
+#
"""Folder which holds framework scripts.
.. versionadded:: 7.0
@@ -5,11 +10,7 @@
``preload_sites`` script, previously added in release 6.0
(:phab:`T226157`), was removed (:phab:`T348925`).
"""
-#
-# (C) Pywikibot team, 2021-2025
-#
-# Distributed under the terms of the MIT license.
-#
+
from __future__ import annotations
from os import environ, getenv
diff --git a/pywikibot/tools/_unidata.py b/pywikibot/tools/_unidata.py
index 3d85468..a37259e 100644
--- a/pywikibot/tools/_unidata.py
+++ b/pywikibot/tools/_unidata.py
@@ -1,9 +1,10 @@
-"""Helper function which holds data from unicodedata library."""
#
# (C) Pywikibot team, 2018-2025
#
# Distributed under the terms of the MIT license.
#
+"""Helper function which holds data from unicodedata library."""
+
from __future__ import annotations
diff --git a/scripts/change_pagelang.py b/scripts/change_pagelang.py
index bedd622..325b5f1 100755
--- a/scripts/change_pagelang.py
+++ b/scripts/change_pagelang.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2018-2025
+#
+# Distributed under the terms of the MIT license.
+#
"""This script changes the content language of pages.
These command line parameters can be used to specify which pages to work
@@ -22,11 +27,7 @@
within a settings file which is scripts.ini by default.
.. versionadded:: 5.1
"""
-#
-# (C) Pywikibot team, 2018-2025
-#
-# Distributed under the terms of the MIT license.
-#
+
from __future__ import annotations
import pywikibot
diff --git a/scripts/maintenance/addwikis.py b/scripts/maintenance/addwikis.py
index 86fa4a0..ec6c7f4 100755
--- a/scripts/maintenance/addwikis.py
+++ b/scripts/maintenance/addwikis.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2024-2025
+#
+# Distributed under the terms of the MIT license.
+#
"""Script that adds new wikis to the codes set in Wikimedia family files.
Usage:
@@ -23,11 +28,7 @@
Multiple families can be given with one run. The difference is shown
instead of the new list.
"""
-#
-# (C) Pywikibot team, 2024-2025
-#
-# Distributed under the terms of the MIT license.
-#
+
from __future__ import annotations
import re
diff --git a/tests/add_text_tests.py b/tests/add_text_tests.py
index 7c26c71..c97f74f 100755
--- a/tests/add_text_tests.py
+++ b/tests/add_text_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Test add_text script."""
#
# (C) Pywikibot team, 2016-2025
#
# Distributed under the terms of the MIT license.
#
+"""Test add_text script."""
+
from __future__ import annotations
import unittest
diff --git a/tests/collections_tests.py b/tests/collections_tests.py
index 29754bf..e611780 100755
--- a/tests/collections_tests.py
+++ b/tests/collections_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for the Wikidata parts of the page module."""
#
# (C) Pywikibot team, 2019-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the Wikidata parts of the page module."""
+
from __future__ import annotations
import unittest
diff --git a/tests/diff_tests.py b/tests/diff_tests.py
index 5306440..bd73808 100755
--- a/tests/diff_tests.py
+++ b/tests/diff_tests.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python3
-"""Test diff module."""
#
# (C) Pywikibot team, 2016-2025
#
# Distributed under the terms of the MIT license.
+"""Test diff module."""
+
from __future__ import annotations
import unittest
diff --git a/tests/eventstreams_tests.py b/tests/eventstreams_tests.py
index db51e41..1d5d268 100755
--- a/tests/eventstreams_tests.py
+++ b/tests/eventstreams_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for the eventstreams module."""
#
# (C) Pywikibot team, 2017-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the eventstreams module."""
+
from __future__ import annotations
import json
diff --git a/tests/generate_family_file_tests.py
b/tests/generate_family_file_tests.py
index e7386a6..020b924 100755
--- a/tests/generate_family_file_tests.py
+++ b/tests/generate_family_file_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Test generate_family_file script."""
#
# (C) Pywikibot team, 2018-2025
#
# Distributed under the terms of the MIT license.
#
+"""Test generate_family_file script."""
+
from __future__ import annotations
import unittest
diff --git a/tests/generate_user_files_tests.py
b/tests/generate_user_files_tests.py
index 609c108..382a594 100755
--- a/tests/generate_user_files_tests.py
+++ b/tests/generate_user_files_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Test generate_user_files script."""
#
# (C) Pywikibot team, 2018-2025
#
# Distributed under the terms of the MIT license.
#
+"""Test generate_user_files script."""
+
from __future__ import annotations
import re
diff --git a/tests/interwikimap_tests.py b/tests/interwikimap_tests.py
index b0cf642..c6c3fc7 100755
--- a/tests/interwikimap_tests.py
+++ b/tests/interwikimap_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for the site module."""
#
# (C) Pywikibot team, 2018-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the site module."""
+
from __future__ import annotations
import unittest
diff --git a/tests/noreferences_tests.py b/tests/noreferences_tests.py
index 93b0521..bf51125 100755
--- a/tests/noreferences_tests.py
+++ b/tests/noreferences_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Test noreferences bot module."""
#
# (C) Pywikibot team, 2018-2025
#
# Distributed under the terms of the MIT license.
#
+"""Test noreferences bot module."""
+
from __future__ import annotations
import unittest
diff --git a/tests/redirect_bot_tests.py b/tests/redirect_bot_tests.py
index f596999..24972e7 100755
--- a/tests/redirect_bot_tests.py
+++ b/tests/redirect_bot_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for the redirect.py script."""
#
# (C) Pywikibot team, 2017-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the redirect.py script."""
+
from __future__ import annotations
import unittest
diff --git a/tests/setup_tests.py b/tests/setup_tests.py
index 8f3557a..f7be7c4 100755
--- a/tests/setup_tests.py
+++ b/tests/setup_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Test setup.py."""
#
# (C) Pywikibot team, 2024-2025
#
# Distributed under the terms of the MIT license.
#
+"""Test setup.py."""
+
from __future__ import annotations
import unittest
diff --git a/tests/superset_tests.py b/tests/superset_tests.py
index 7977f2f..48c4487 100755
--- a/tests/superset_tests.py
+++ b/tests/superset_tests.py
@@ -1,13 +1,14 @@
#!/usr/bin/env python3
-"""Tests for superset module.
-
-.. versionadded:: 9.2
-"""
#
# (C) Pywikibot team, 2024-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for superset module.
+
+.. versionadded:: 9.2
+"""
+
from __future__ import annotations
import unittest
diff --git a/tests/titletranslate_tests.py b/tests/titletranslate_tests.py
index eefc989..6ee89b7 100755
--- a/tests/titletranslate_tests.py
+++ b/tests/titletranslate_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for titletranslate module."""
#
# (C) Pywikibot team, 2022-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for titletranslate module."""
+
from __future__ import annotations
import unittest
diff --git a/tests/user_tests.py b/tests/user_tests.py
index 8099e30..3b9bc0d 100755
--- a/tests/user_tests.py
+++ b/tests/user_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for the User page."""
#
# (C) Pywikibot team, 2016-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the User page."""
+
from __future__ import annotations
import unittest
diff --git a/tests/wikiblame_tests.py b/tests/wikiblame_tests.py
index b69706b..1ae5172 100644
--- a/tests/wikiblame_tests.py
+++ b/tests/wikiblame_tests.py
@@ -1,9 +1,10 @@
-"""Tests for the WikiHistoryMixin."""
#
# (C) Pywikibot team, 2022-2025
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the WikiHistoryMixin."""
+
from __future__ import annotations
import re
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238722?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: I7e1a632a1b1e4691d064b216c22cc3066d96d6cf
Gerrit-Change-Number: 1238722
Gerrit-PatchSet: 3
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]