@@ -111,12 +111,9 @@ def get_files_for_project(project_name):
111111 """Get the set of files for a learn project"""
112112 found_files = set ()
113113 project_dir = "{}/{}/" .format (LEARN_GUIDE_REPO , project_name )
114- # root level
115- full_tree = os .walk (project_dir )
116114
115+ full_tree = os .walk (project_dir )
117116 root_level = next (full_tree )
118- if project_name == "NeoTrellis_M4_MIDI_Synth" :
119- print (root_level )
120117
121118 for file in root_level [2 ]:
122119 if "." in file :
@@ -126,19 +123,9 @@ def get_files_for_project(project_name):
126123 found_files .add (file )
127124
128125 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
132126 dir_tuple = (_dir , tuple ())
133127 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)
138128 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
142129 for _sub_dir in cur_tuple [1 ]:
143130 dir_tuple = (dir_tuple [0 ], dir_tuple [1 ] + (_sub_dir ,))
144131 for _sub_file in cur_tuple [2 ]:
0 commit comments