@@ -111,12 +111,9 @@ def get_files_for_project(project_name):
111
111
"""Get the set of files for a learn project"""
112
112
found_files = set ()
113
113
project_dir = "{}/{}/" .format (LEARN_GUIDE_REPO , project_name )
114
- # root level
115
- full_tree = os .walk (project_dir )
116
114
115
+ full_tree = os .walk (project_dir )
117
116
root_level = next (full_tree )
118
- if project_name == "NeoTrellis_M4_MIDI_Synth" :
119
- print (root_level )
120
117
121
118
for file in root_level [2 ]:
122
119
if "." in file :
@@ -126,19 +123,9 @@ def get_files_for_project(project_name):
126
123
found_files .add (file )
127
124
128
125
for _dir in root_level [1 ]:
129
- if project_name == "NeoTrellis_M4_MIDI_Synth" :
130
- print (_dir )
131
- # TODO: second item needs to be a tuple
132
126
dir_tuple = (_dir , tuple ())
133
127
for cur_tuple in os .walk (project_dir ):
134
- if project_name == "NeoTrellis_M4_MIDI_Synth" :
135
- print (cur_tuple )
136
- #print("{} - {}".format(cur_tuple[0].split("/")[-1], _dir))
137
- #print(cur_tuple)
138
128
if cur_tuple [0 ].split ("/" )[- 1 ] == _dir :
139
- # TODO: can't use add or append to add to a tuple
140
- # TODO: need to use + to make new tuple or * unpacking
141
- # https://stackoverflow.com/questions/16730339/python-add-item-to-the-tuple
142
129
for _sub_dir in cur_tuple [1 ]:
143
130
dir_tuple = (dir_tuple [0 ], dir_tuple [1 ] + (_sub_dir ,))
144
131
for _sub_file in cur_tuple [2 ]:
0 commit comments