From 0982f8de197660280e9fcd634249f46b91ee119c Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 7 Aug 2024 13:25:53 -0400 Subject: [PATCH] FIX: Type --- sphinx/builders/html/__init__.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py index 592355dd2f3..1c4310002b6 100644 --- a/sphinx/builders/html/__init__.py +++ b/sphinx/builders/html/__init__.py @@ -98,7 +98,7 @@ def _stable_str(obj: Any) -> str: return json.dumps(_json_prep(obj), separators=(',', ':')) -def _json_prep(obj: Any) -> dict | list | str: +def _json_prep(obj: Any) -> dict[str, Any] | list[Any] | str: if isinstance(obj, dict): # convert to a sorted dict obj = {_json_prep(k): _json_prep(v) for k, v in obj.items()} @@ -424,23 +424,6 @@ def get_outdated_docs(self) -> Iterator[str]: if self.templates: template_mtime = int(self.templates.newest_template_mtime() * 10**6) - try: - old_mtime = _last_modified_time(old_info) - except Exception: - pass - else: - # Let users know they have a newer template - if template_mtime > old_mtime: - logger.info( - bold("building [html]: ") + - __( - "template %s is newer (%s) than previous build info (%s), " - "all docs will be out of date" - ), - self.templates.newest_template_name(), - _format_rfc3339_microseconds(template_mtime), - _format_rfc3339_microseconds(old_mtime), - ) else: template_mtime = 0 for docname in self.env.found_docs: