jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1155617?usp=email )

Change subject: typing: Fix typing annotations
......................................................................

typing: Fix typing annotations

Change-Id: I0d04ecf8d6931863c708d4d4a4947331e3d0b5f7
---
M pywikibot/logentries.py
M pywikibot/throttle.py
M pywikibot/tools/__init__.py
M tests/utils.py
4 files changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index 92a34cf..3656006 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -77,7 +77,7 @@
         """Combine site and logid as the hash."""
         return self.logid() ^ hash(self.site)

-    def __eq__(self, other: Any) -> bool:
+    def __eq__(self, other: object) -> bool:
         """Compare if self is equal to other."""
         if not isinstance(other, LogEntry):
             pywikibot.debug(f"'{type(self).__name__}' cannot be compared with "
diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py
index 20680a8..d0ae2da 100644
--- a/pywikibot/throttle.py
+++ b/pywikibot/throttle.py
@@ -67,7 +67,7 @@
     def __init__(self, site: pywikibot.site.BaseSite | str, *,
                  mindelay: int | None = None,
                  maxdelay: int | None = None,
-                 writedelay: int | float | None = None) -> None:
+                 writedelay: float | None = None) -> None:
         """Initializer."""
         self.lock = threading.RLock()
         self.lock_write = threading.RLock()
@@ -261,7 +261,7 @@
         self._write_file(processes)

     @staticmethod
-    def wait(seconds: int | float) -> None:
+    def wait(seconds: float) -> None:
         """Wait for seconds seconds.

         Announce the delay if it exceeds a preset limit.
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 8fcae2d..4740030 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -511,7 +511,7 @@
         """
         return f"'{self}'"

-    def __eq__(self, other: Any) -> bool:
+    def __eq__(self, other: object) -> bool:
         if isinstance(other, str):
             other = MediaWikiVersion(other)
         elif not isinstance(other, MediaWikiVersion):
diff --git a/tests/utils.py b/tests/utils.py
index 95341b8..70f7c38 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -513,7 +513,7 @@

 def execute_pwb(args: list[str], *,
                 data_in: Sequence[str] | None = None,
-                timeout: int | float | None = None,
+                timeout: float | None = None,
                 overrides: dict[str, str] | None = None) -> dict[str, Any]:
     """Execute the pwb.py script and capture outputs.


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1155617?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: I0d04ecf8d6931863c708d4d4a4947331e3d0b5f7
Gerrit-Change-Number: 1155617
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[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]

Reply via email to