@@ -484,13 +484,12 @@ def prepare_writing(self, docnames: set[str]) -> None:
484484
485485 # format the "last updated on" string, only once is enough since it
486486 # typically doesn't include the time of day
487- self .last_updated : str | None
488- lufmt = self .config .html_last_updated_fmt
489- if lufmt is not None :
490- self .last_updated = format_date (lufmt or _ ('%b %d, %Y' ),
491- language = self .config .language )
487+ last_updated : str | None
488+ if (lu_fmt := self .config .html_last_updated_fmt ) is not None :
489+ lu_fmt = lu_fmt or _ ('%b %d, %Y' )
490+ last_updated = format_date (lu_fmt , language = self .config .language )
492491 else :
493- self . last_updated = None
492+ last_updated = None
494493
495494 # If the logo or favicon are urls, keep them as-is, otherwise
496495 # strip the relative path as the files will be copied into _static.
@@ -529,7 +528,7 @@ def prepare_writing(self, docnames: set[str]) -> None:
529528 'project' : self .config .project ,
530529 'release' : return_codes_re .sub ('' , self .config .release ),
531530 'version' : self .config .version ,
532- 'last_updated' : self . last_updated ,
531+ 'last_updated' : last_updated ,
533532 'copyright' : self .config .copyright ,
534533 'master_doc' : self .config .root_doc ,
535534 'root_doc' : self .config .root_doc ,
0 commit comments