From bfb60be0c66cc76761ee827e55d9b9d28412e22b Mon Sep 17 00:00:00 2001 From: Sai-Suraj-27 Date: Sat, 13 Jul 2024 18:02:16 +0530 Subject: [PATCH 1/3] Fixed the arguments in create_repo() function call. --- src/transformers/commands/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/commands/user.py b/src/transformers/commands/user.py index 938f4c8ea8b616..7f6281fe83eca7 100644 --- a/src/transformers/commands/user.py +++ b/src/transformers/commands/user.py @@ -185,7 +185,7 @@ def run(self): print("Abort") exit() try: - url = create_repo(token, name=self.args.name, organization=self.args.organization) + url = create_repo(repo_id=full_name, token=token,) except HTTPError as e: print(e) print(ANSI.red(e.response.text)) From f1a560282c9c9b56955c68ca33f604a574116b13 Mon Sep 17 00:00:00 2001 From: Sai-Suraj-27 Date: Sat, 13 Jul 2024 18:15:34 +0530 Subject: [PATCH 2/3] Formatted the code properly using ruff. --- src/transformers/commands/user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/transformers/commands/user.py b/src/transformers/commands/user.py index 7f6281fe83eca7..c5352f0ea04d68 100644 --- a/src/transformers/commands/user.py +++ b/src/transformers/commands/user.py @@ -185,7 +185,10 @@ def run(self): print("Abort") exit() try: - url = create_repo(repo_id=full_name, token=token,) + url = create_repo( + repo_id=full_name, + token=token, + ) except HTTPError as e: print(e) print(ANSI.red(e.response.text)) From 3bca4e9e6415d59d4d94edc00a75b10d6d188551 Mon Sep 17 00:00:00 2001 From: Sai-Suraj-27 Date: Mon, 15 Jul 2024 20:12:53 +0530 Subject: [PATCH 3/3] Formatted the code more clearly. --- src/transformers/commands/user.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/transformers/commands/user.py b/src/transformers/commands/user.py index c5352f0ea04d68..bf4072ce04689b 100644 --- a/src/transformers/commands/user.py +++ b/src/transformers/commands/user.py @@ -185,10 +185,7 @@ def run(self): print("Abort") exit() try: - url = create_repo( - repo_id=full_name, - token=token, - ) + url = create_repo(repo_id=full_name, token=token) except HTTPError as e: print(e) print(ANSI.red(e.response.text))