File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+
3+ from exercise_utils .git import add , init , commit
4+ from exercise_utils .file import create_or_update_file , append_to_file
5+
6+ __requires_git__ = True
7+ __requires_github__ = False
8+
9+
10+ def download (verbose : bool ):
11+ os .makedirs ("things" )
12+ os .chdir ("things" )
13+ init (verbose )
14+ create_or_update_file (
15+ "fruits.txt" ,
16+ """
17+ apples
18+ bananas
19+ cherries
20+ dragon fruits
21+ figs
22+ """ ,
23+ )
24+ add (["fruits.txt" ], verbose )
25+ append_to_file ("fruits.txt" , """
26+ figs
27+ """ ,
28+ )
29+ add (["fruits.txt" ], verbose )
30+ commit ("Insert figs into fruits.txt" , verbose )
31+ create_or_update_file ("colours.txt" , """
32+ a file for colours
33+ """ ,
34+ )
35+ create_or_update_file ("shapes.txt" , """
36+ a file for shapes
37+ """ ,
38+ )
39+ add (["colours.txt" , "shapes.txt" ], verbose )
40+ commit ("Add colours.txt, shapes.txt" , verbose )
You can’t perform that action at this time.
0 commit comments