              The full path to the newly created ``.fsa`` alignments file
          """
          logger.info("Reformatting legacy alignments file...")
          old_location = os.path.join(str(folder), filename)
          new_location = "{}.{}".format(os.path.splitext(old_location)[0],
                                        self._serializer.file_extension)
          if os.path.exists(old_location):
              if os.path.exists(new_location):
                  logger.info("Using existing updated alignments file found at '%s'. If you do not "
                              "wish to use this existing file then you should delete or rename it.",
                              new_location)
 
</s> remove             raise FaceswapError("Error: Alignments file not found at "
                                "{}".format(self._file))
 </s> add             raise FaceswapError(f"Error: Alignments file not found at {self._file}") </s> remove def update_legacy_png_header(filename, alignments):
 </s> add def update_legacy_png_header(filename: str, alignments: Alignments
                             ) -> Optional[PNGHeaderDict]: </s> remove                 "There is a mismatch between the number of frames found in the video file ({}) "
                "and the number of frames found in the alignments file ({})."
                "\nThis can be caused by a number of issues:"
 </s> add                 "There is a mismatch between the number of frames found in the video file "
                f"({len(pts_time)}) and the number of frames found in the alignments file "
                f"({len(self.data)}).\nThis can be caused by a number of issues:" </s> remove             legacy_filename = "{}{}".format(filename, ext)
 </s> add             legacy_filename = f"{filename}{ext}" </s> remove             filename = "{}.{}".format(noext_name, self._serializer.file_extension)
 </s> add             filename = f"{noext_name}.{self._serializer.file_extension}"
        new_location = f"{os.path.splitext(old_location)[0]}.{self._serializer.file_extension}"
              The full path to the newly created ``.fsa`` alignments file
          """
          logger.info("Reformatting legacy alignments file...")
          old_location = os.path.join(str(folder), filename)
        new_location = f"{os.path.splitext(old_location)[0]}.{self._serializer.file_extension}"
        new_location = f"{os.path.splitext(old_location)[0]}.{self._serializer.file_extension}"
          if os.path.exists(old_location):
              if os.path.exists(new_location):
                  logger.info("Using existing updated alignments file found at '%s'. If you do not "
                              "wish to use this existing file then you should delete or rename it.",
                              new_location)
keep keep keep keep replace replace keep keep keep keep keep
 lib.align updates:
  - alignments.py
    - Add typed dicts for imported alignments
    - Explicitly check for presence of thumb value in alignments dict
    - linting
  - detected_face.py
    - Typing
    - Linting
    - Legacy support for pre-aligned face
    - Update dependencies to new property names 
lib/align/alignments.py