parameters: (self)
docstring: Cleanup backup files.
docstring_summary: Cleanup backup files.
docstring_tokens: Cleanup backup files .
function: def cleanup(self) -> None:
          """Cleanup backup files."""
          if not os.path.exists(self.backup_path):
              return
  
          shutil.rmtree(self.backup_path)
  
          # Wait for the folder to be removed
          while os.path.exists(self.backup_path):
              sleep(0.1)
          self.hacs.log.debug("Backup dir %s cleared", self.backup_path)
function_tokens: def cleanup ( self ) -> None : if not os . path . exists ( self . backup_path ) : return shutil . rmtree ( self . backup_path ) # Wait for the folder to be removed while os . path . exists ( self . backup_path ) : sleep ( 0.1 ) self . hacs . log . debug ( "Backup dir %s cleared" , self . backup_path )