|
1 | 1 | from typing import Dict, List, Optional |
2 | 2 |
|
3 | 3 | from e2b.sandbox.git_utils import ( |
4 | | - GitBranches, |
5 | | - GitStatus, |
6 | | - build_auth_error_message, |
7 | | - build_git_command, |
8 | | - build_push_args, |
9 | | - build_upstream_error_message, |
10 | | - is_auth_failure, |
11 | | - is_missing_upstream, |
12 | | - parse_git_branches, |
13 | | - parse_git_status, |
14 | | - resolve_config_scope, |
15 | | - shell_escape, |
16 | | - strip_credentials, |
17 | | - derive_repo_dir_from_url, |
18 | | - with_credentials, |
| 4 | + GitBranches, |
| 5 | + GitStatus, |
| 6 | + build_auth_error_message, |
| 7 | + build_git_command, |
| 8 | + build_push_args, |
| 9 | + build_upstream_error_message, |
| 10 | + is_auth_failure, |
| 11 | + is_missing_upstream, |
| 12 | + parse_git_branches, |
| 13 | + parse_git_status, |
| 14 | + resolve_config_scope, |
| 15 | + shell_escape, |
| 16 | + strip_credentials, |
| 17 | + derive_repo_dir_from_url, |
| 18 | + with_credentials, |
19 | 19 | ) |
20 | 20 | from e2b.exceptions import ( |
21 | 21 | GitAuthException, |
@@ -322,9 +322,7 @@ def attempt_clone(auth_username: Optional[str], auth_password: Optional[str]): |
322 | 322 | except CommandExitException as err: |
323 | 323 | if is_auth_failure(err): |
324 | 324 | raise GitAuthException( |
325 | | - build_auth_error_message( |
326 | | - "clone", bool(username) and not password |
327 | | - ) |
| 325 | + build_auth_error_message("clone", bool(username) and not password) |
328 | 326 | ) from err |
329 | 327 | raise |
330 | 328 |
|
@@ -860,9 +858,7 @@ def push( |
860 | 858 | except CommandExitException as err: |
861 | 859 | if is_auth_failure(err): |
862 | 860 | raise GitAuthException( |
863 | | - build_auth_error_message( |
864 | | - "push", bool(username) and not password |
865 | | - ) |
| 861 | + build_auth_error_message("push", bool(username) and not password) |
866 | 862 | ) from err |
867 | 863 | if is_missing_upstream(err): |
868 | 864 | raise GitUpstreamException( |
@@ -948,9 +944,7 @@ def build_args(remote_name: Optional[str] = None) -> List[str]: |
948 | 944 | except CommandExitException as err: |
949 | 945 | if is_auth_failure(err): |
950 | 946 | raise GitAuthException( |
951 | | - build_auth_error_message( |
952 | | - "pull", bool(username) and not password |
953 | | - ) |
| 947 | + build_auth_error_message("pull", bool(username) and not password) |
954 | 948 | ) from err |
955 | 949 | if is_missing_upstream(err): |
956 | 950 | raise GitUpstreamException( |
|
0 commit comments