Skip to content

Commit

Permalink
FIX: Type
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Aug 7, 2024
1 parent a050364 commit 0982f8d
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 0982f8d

Please sign in to comment.