File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ def asset_path(asset_name):
7171 "txt" : file_empty_icon ,
7272 "toml" : file_icon ,
7373 "bmp" : file_image_icon ,
74+ "png" : file_image_icon ,
7475 "wav" : file_music_icon ,
7576 "mp3" : file_music_icon ,
7677 "mid" : file_music_icon ,
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ def get_files_for_project(project_name):
165165
166166
167167def get_libs_for_project (project_name ):
168+ # pylint: disable=too-many-nested-blocks
168169 """Get the set of libraries for a learn project"""
169170 found_libs = set ()
170171 found_imports = []
@@ -173,11 +174,23 @@ def get_libs_for_project(project_name):
173174 if file .endswith (".py" ):
174175
175176 found_imports = findimports .find_imports (f"{ project_dir } { file } " )
176-
177177 for cur_import in found_imports :
178178 cur_lib = cur_import .name .split ("." )[0 ]
179179 if cur_lib in bundle_data or cur_lib in community_bundle_data :
180180 found_libs .add (cur_lib )
181+ if cur_import .name .endswith (".*" ):
182+ filepath = os .path .join (
183+ project_dir , "/" .join (cur_import .name [:- 2 ].split ("." )) + ".py"
184+ )
185+ if os .path .exists (filepath ):
186+ second_level_imports = findimports .find_imports (filepath )
187+ for cur_second_level_import in second_level_imports :
188+ cur_lib = cur_second_level_import .name .split ("." )[0 ]
189+ if (
190+ cur_lib in bundle_data
191+ or cur_lib in community_bundle_data
192+ ):
193+ found_libs .add (cur_lib )
181194
182195 return found_libs
183196
You can’t perform that action at this time.
0 commit comments