jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/868094 )
Change subject: [IMPR] Remove obsolete code from BaseSite.__getattr__() ......................................................................
[IMPR] Remove obsolete code from BaseSite.__getattr__()
__getattr__ is only called when the default attribute access fails
Change-Id: Ieddaeb938fffb032cef20f4bf0f9890b9131c701 --- M pywikibot/site/_basesite.py 1 file changed, 11 insertions(+), 2 deletions(-)
Approvals: RoySmith: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py index 80dacc7..de5f5c9 100644 --- a/pywikibot/site/_basesite.py +++ b/pywikibot/site/_basesite.py @@ -186,8 +186,6 @@
def __getattr__(self, attr): """Delegate undefined methods calls to the Family object.""" - if hasattr(self.__class__, attr): - return getattr(self.__class__, attr) try: method = getattr(self.family, attr) if not callable(method):