jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[bugfix] Missing Type class for echo.py

Oops! My bad. I usually check Python 3.5.0 compatibility but skipped echo.py
because it seemed pretty simple.

Bug: T289034
Change-Id: I4a1fa84d02132ee606f96b72660b5296bf382791
---
M pywikibot/echo.py
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pywikibot/echo.py b/pywikibot/echo.py
index 15b8bda..4db1dfc 100644
--- a/pywikibot/echo.py
+++ b/pywikibot/echo.py
@@ -5,10 +5,14 @@
# Distributed under the terms of the MIT license.
#
import pywikibot
-from typing import Any, Optional, Type
+from typing import Any, Optional
from pywikibot.backports import Dict
from pywikibot.tools import deprecated

+# TODO: replace these after T286867
+
+NOTIFICATION_CLASS_TYPE = Any # Type['Notification']
+

class Notification:

@@ -29,7 +33,7 @@
self.revid = None

@classmethod
- def fromJSON(cls: Type['Notification'], # noqa: N802
+ def fromJSON(cls: NOTIFICATION_CLASS_TYPE, # noqa: N802
site: 'pywikibot.site.BaseSite',
data: Dict[str, Any]) -> 'Notification':
"""Construct a Notification object from our API's JSON data."""

To view, visit change 713433. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I4a1fa84d02132ee606f96b72660b5296bf382791
Gerrit-Change-Number: 713433
Gerrit-PatchSet: 1
Gerrit-Owner: Damian <atagar1@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged