mypy: Enable new error explicit-override.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-10-12 10:43:45 -07:00
committed by Anders Kaseorg
parent d257002ad8
commit a50eb2e809
223 changed files with 936 additions and 18 deletions

View File

@@ -3,6 +3,8 @@ from posixpath import basename
from typing import Any, List, Set
from urllib.parse import urlparse
from typing_extensions import override
from .common.spiders import BaseDocumentationSpider
@@ -21,6 +23,7 @@ class UnusedImagesLinterSpider(BaseDocumentationSpider):
self.static_images: Set[str] = set()
self.images_static_dir: str = get_images_dir(self.images_path)
@override
def _is_external_url(self, url: str) -> bool:
is_external = url.startswith("http") and self.start_urls[0] not in url
if self._has_extension(url) and f"localhost:9981/{self.images_path}" in url:
@@ -55,6 +58,7 @@ class APIDocumentationSpider(UnusedImagesLinterSpider):
class PorticoDocumentationSpider(BaseDocumentationSpider):
@override
def _is_external_url(self, url: str) -> bool:
return (
not url.startswith("http://localhost:9981")