jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238351?usp=email )
Change subject: Move copyright headers above module docstrings
......................................................................
Move copyright headers above module docstrings
Bug: T416673
Change-Id: Ieba10074ea492bb19811ec0c77b7da8275c4e280
---
M pywikibot/site/_basesite.py
M pywikibot/site/_decorators.py
M pywikibot/site/_extensions.py
M pywikibot/site/_generators.py
M pywikibot/site/_namespace.py
M pywikibot/tools/__init__.py
M pywikibot/tools/_deprecate.py
M pywikibot/tools/itertools.py
M scripts/revertbot.py
M tests/site_tests.py
M tests/wikibase_tests.py
11 files changed, 34 insertions(+), 23 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py
index 092de9a..f542f14 100644
--- a/pywikibot/site/_basesite.py
+++ b/pywikibot/site/_basesite.py
@@ -1,9 +1,10 @@
-"""Objects with site methods independent of the communication interface."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Objects with site methods independent of the communication interface."""
+
from __future__ import annotations
import functools
diff --git a/pywikibot/site/_decorators.py b/pywikibot/site/_decorators.py
index bc9aa82..3348687 100644
--- a/pywikibot/site/_decorators.py
+++ b/pywikibot/site/_decorators.py
@@ -1,9 +1,10 @@
-"""Decorators used by site models."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Decorators used by site models."""
+
from __future__ import annotations
import os
diff --git a/pywikibot/site/_extensions.py b/pywikibot/site/_extensions.py
index ed662b9..fc496a5 100644
--- a/pywikibot/site/_extensions.py
+++ b/pywikibot/site/_extensions.py
@@ -1,9 +1,10 @@
-"""Objects representing API interface to MediaWiki site extensions."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Objects representing API interface to MediaWiki site extensions."""
+
from __future__ import annotations
from collections.abc import Generator, Iterable
diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py
index 1fc554a..6901ef8 100644
--- a/pywikibot/site/_generators.py
+++ b/pywikibot/site/_generators.py
@@ -1,9 +1,10 @@
-"""Objects representing API generators to MediaWiki site."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Objects representing API generators to MediaWiki site."""
+
from __future__ import annotations
import heapq
diff --git a/pywikibot/site/_namespace.py b/pywikibot/site/_namespace.py
index e7a5b08..19f767f 100644
--- a/pywikibot/site/_namespace.py
+++ b/pywikibot/site/_namespace.py
@@ -1,9 +1,10 @@
-"""Objects representing Namespaces of MediaWiki site."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Objects representing Namespaces of MediaWiki site."""
+
from __future__ import annotations
from abc import ABCMeta
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 182a83c..a796890 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1,9 +1,10 @@
-"""Miscellaneous helper functions (not wiki-dependent)."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Miscellaneous helper functions (not wiki-dependent)."""
+
from __future__ import annotations
import abc
diff --git a/pywikibot/tools/_deprecate.py b/pywikibot/tools/_deprecate.py
index 27984e9..f507d14 100644
--- a/pywikibot/tools/_deprecate.py
+++ b/pywikibot/tools/_deprecate.py
@@ -1,3 +1,8 @@
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
"""Module providing deprecation decorators.
Decorator functions without parameters are _invoked_ differently from
@@ -18,11 +23,7 @@
.. versionchanged:: 6.4
deprecation decorators moved to _deprecate submodule
"""
-#
-# (C) Pywikibot team, 2008-2026
-#
-# Distributed under the terms of the MIT license.
-#
+
from __future__ import annotations
import collections
diff --git a/pywikibot/tools/itertools.py b/pywikibot/tools/itertools.py
index 0321b2f..88f6848 100644
--- a/pywikibot/tools/itertools.py
+++ b/pywikibot/tools/itertools.py
@@ -1,13 +1,14 @@
-"""Iterator functions.
-
-.. note:: ``pairwise()`` function introduced in Python 3.10 is backported
- in :mod:`backports`
-"""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Iterator functions.
+
+.. note:: ``pairwise()`` function introduced in Python 3.10 is backported
+ in :mod:`backports`
+"""
+
from __future__ import annotations
import collections
diff --git a/scripts/revertbot.py b/scripts/revertbot.py
index 6c87e94..6930058 100755
--- a/scripts/revertbot.py
+++ b/scripts/revertbot.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# (C) Pywikibot team, 2008-2026
+#
+# Distributed under the terms of the MIT license.
+#
r"""This script can be used for reverting certain edits.
The following command line parameters are supported:
@@ -35,11 +40,7 @@
return bool(pattern.search(text))
return False
"""
-#
-# (C) Pywikibot team, 2008-2026
-#
-# Distributed under the terms of the MIT license.
-#
+
from __future__ import annotations
from collections.abc import Container
diff --git a/tests/site_tests.py b/tests/site_tests.py
index cc3ddfa..7a10d8b 100755
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for the site module."""
#
# (C) Pywikibot team, 2008-2026
#
# Distributed under the terms of the MIT license.
#
+"""Tests for the site module."""
+
from __future__ import annotations
import pickle
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index eb8cf13..4038c83 100755
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python3
-"""Tests for the Wikidata parts of the page module."""
#
# (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 copy
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1238351?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: Ieba10074ea492bb19811ec0c77b7da8275c4e280
Gerrit-Change-Number: 1238351
Gerrit-PatchSet: 1
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]