class DeleteFilesSubCommand:
    def __init__(self, args) -> None:
        self.args = args
        self.repo_id: str = args.repo_id
        self.repo_type: Optional[str] = args.repo_type
        self.revision: Optional[str] = args.revision
        self.api: HfApi = HfApi(token=args.token, library_name="huggingface-cli")
        self.patterns: List[str] = args.patterns
        self.commit_message: Optional[str] = args.commit_message
        self.commit_description: Optional[str] = args.commit_description
        self.create_pr: bool = args.create_pr
        self.token: Optional[str] = args.token

    def run(self) -> None:
        logging.set_verbosity_info()
        url = self.api.delete_files(
            delete_patterns=self.patterns,
            repo_id=self.repo_id,
            repo_type=self.repo_type,
            revision=self.revision,
            commit_message=self.commit_message,
            commit_description=self.commit_description,
            create_pr=self.create_pr,
        )
        print(f"Files correctly deleted from repo. Commit: {url}.")
        logging.set_verbosity_warning()
/Users/nielsrogge/Documents/python_projecten/huggingface_hub/src/huggingface_hub/commands/repo_files.py