Skip to content

Commit fbd9c44

Browse files
MousseDmwoojiahao
andauthored
[hp-ignore-file] Implement hands on hp-ignore-file (#83)
# Exercise Review ## Exercise Discussion #58 ## Checklist - [ ] If you require a new remote repository on the `Git-Mastery` organization, have you [created a request](https://github.com/git-mastery/exercises/issues/new?template=request_exercise_repository.md) for it? - [ ] Have you written unit tests using [`repo-smith`](https://github.com/git-mastery/repo-smith) to validate the exercise grading scheme? - [x] Have you tested the download script using `test-download.sh`? - [x] Have you verified that this exercise does not already exist or is not currently in review? - [ ] Did you introduce a new grading mechanism that should belong to [`git-autograder`](https://github.com/git-mastery/git-autograder)? - [ ] Did you introduce a new dependency that should belong to [`app`](https://github.com/git-mastery/app)? --------- Co-authored-by: Jiahao <woojiahao1234@gmail.com>
1 parent e711ca4 commit fbd9c44

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

hands_on/ignore_file.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os
2+
from exercise_utils.file import create_or_update_file
3+
from exercise_utils.git import init
4+
5+
__requires_git__ = True
6+
__requires_github__ = False
7+
8+
def download(verbose: bool):
9+
os.makedirs("stuff", exist_ok=True)
10+
os.chdir("stuff")
11+
init(verbose)
12+
13+
create_or_update_file("keep.txt", "good stuff")
14+
create_or_update_file("temp.txt", "temp stuff")
15+
create_or_update_file("file1.tmp", "more temp stuff")
16+
create_or_update_file("file2.tmp", "even more temp stuff")

0 commit comments

Comments
 (0)