jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/767210 )
Change subject: [bugfix] import dependecies at top of a script file
......................................................................
[bugfix] import dependecies at top of a script file
Bug: T302774
Change-Id: I939757ea3498927d3df949a478706c472a0a9643
---
M pywikibot/page/__init__.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Matěj Suchánek: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index 536c5cb..f3db6ea 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -30,9 +30,10 @@
from warnings import warn
import pywikibot
-from pywikibot import config, i18n, textlib
+from pywikibot import config, date, i18n, textlib
from pywikibot.backports import Dict, Generator, Iterable, List, Tuple
from pywikibot.comms import http
+from pywikibot.cosmetic_changes import CANCEL, CosmeticChangesToolkit
from pywikibot.exceptions import (
APIError,
AutoblockUserError,
@@ -405,7 +406,6 @@
same names. Regular titles return (None, None).
"""
if not hasattr(self, '_autoFormat'):
- from pywikibot import date
self._autoFormat = date.getAutoFormat(
self.site.lang,
self.title(with_ns=False)
@@ -1266,7 +1266,6 @@
pywikibot.log('Cosmetic changes for {}-{} enabled.'
.format(family, self.site.lang))
# cc depends on page directly and via several other imports
- from pywikibot.cosmetic_changes import CANCEL, CosmeticChangesToolkit
cc_toolkit = CosmeticChangesToolkit(self, ignore=CANCEL.MATCH)
self.text = cc_toolkit.change(old)
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/767210
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I939757ea3498927d3df949a478706c472a0a9643
Gerrit-Change-Number: 767210
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]