| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -135,11 +135,11 @@ def test_cloned_repo_object(self, local_dir): | |||
| 135 | 135 | # ![14-test_cloned_repo_object] | |
| 136 | 136 | ||
| 137 | 137 | # [15-test_cloned_repo_object] | |
| 138 | - def print_files_from_git(root, delim='-', i=0): | ||
| 138 | + def print_files_from_git(root, level=0): | ||
| 139 | 139 | for entry in root: | |
| 140 | - print(f'{delim if i != 0 else ""}| {entry.path}, {entry.type}') | ||
| 140 | + print(f'{"-" * 4 * level}| {entry.path}, {entry.type}') | ||
| 141 | 141 | if entry.type == "tree": | |
| 142 | - print_files_from_git(entry, delim * 4, i + 1) | ||
| 142 | + print_files_from_git(entry, level + 1) | ||
| 143 | 143 | ||
| 144 | 144 | # ![15-test_cloned_repo_object] | |
| 145 | 145 | ||
@@ -148,10 +148,10 @@ def print_files_from_git(root, delim='-', i=0): | |||
| 148 | 148 | ||
| 149 | 149 | # Output | |
| 150 | 150 | # | Downloads, tree | |
| 151 | - # ---- | Downloads / file3.txt, blob | ||
| 151 | + # ----| Downloads / file3.txt, blob | ||
| 152 | 152 | # | dir1, tree | |
| 153 | - # ---- | dir1 / file1.txt, blob | ||
| 154 | - # ---- | dir1 / file2.txt, blob | ||
| 153 | + # ----| dir1 / file1.txt, blob | ||
| 154 | + # ----| dir1 / file2.txt, blob | ||
| 155 | 155 | # | file4.txt, blob | |
| 156 | 156 | # # ![16-test_cloned_repo_object] | |
| 157 | 157 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments