jenkins-bot submitted this change.
[IMPR] Move RemovedSite to _basesite.py
- Move RemovedSite to _basesite.py
- make 'fam' parameter optional and only derive RemovedSite from BaseSite
Change-Id: Ib350f38812e9b842529bcfa22fe207e8801ebc47
---
M pywikibot/site/__init__.py
M pywikibot/site/_basesite.py
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py
index c6f2cae..5894f11 100644
--- a/pywikibot/site/__init__.py
+++ b/pywikibot/site/__init__.py
@@ -63,7 +63,7 @@
TitleblacklistError,
UnknownExtension,
)
-from pywikibot.site._basesite import BaseSite, PageInUse
+from pywikibot.site._basesite import BaseSite, PageInUse, RemovedSite
from pywikibot.site._decorators import need_extension, need_right, need_version
from pywikibot.site._interwikimap import _InterwikiMap
from pywikibot.site._namespace import Namespace, NamespacesDict
@@ -97,16 +97,6 @@
_logger = 'wiki.site'
-class RemovedSite(BaseSite):
-
- """Site removed from a family."""
-
- @remove_last_args(['sysop'])
- def __init__(self, code, fam, user=None):
- """Initializer."""
- super().__init__(code, fam, user)
-
-
_mw_msg_cache = defaultdict(dict)
diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py
index 7e7b5e2..33ab88b 100644
--- a/pywikibot/site/_basesite.py
+++ b/pywikibot/site/_basesite.py
@@ -534,3 +534,10 @@
def getSite(self, code): # noqa: N802
"""Return Site object for language 'code' in this Family."""
return pywikibot.Site(code=code, fam=self.family, user=self.user())
+
+
+class RemovedSite(BaseSite):
+
+ """Site removed from a family."""
+
+ pass
To view, visit change 647673. To unsubscribe, or for help writing mail filters, visit settings.